PS 부수기
Project Euler #28 : Number spiral diagonals 본문
1 2 3 4 5 6 7 8 9 10 11 12 13 | int main() { IOS; llong sum = 1; llong last = 1; for (int i = 1; i <= 500; i++) { llong iv = i * 2; for (int j = 1; j <= 4; j++) { sum += last + iv; last += iv; } } cout << sum; } | cs |
'Project Euler' 카테고리의 다른 글
Project Euler #30 : Digit fifth powers (0) | 2020.08.08 |
---|---|
Project Euler #29 : Distinct powers (0) | 2020.08.08 |
Project Euler #27 : Quadratic primes (0) | 2020.08.08 |
Project Euler #26 Reciprocal cycles (0) | 2020.08.08 |
Project Euler #25 : 피보나치 수열에서 처음으로 1000자리가 되는 항은 몇 번째? (0) | 2020.08.07 |
Comments