結果

問題 No.2174 3 O'clock Easy
ユーザー roarisroaris
提出日時 2022-12-31 23:04:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 164 bytes
コンパイル時間 313 ms
コンパイル使用メモリ 86,964 KB
実行使用メモリ 75,968 KB
最終ジャッジ日時 2023-08-17 21:58:38
合計ジャッジ時間 1,934 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,240 KB
testcase_01 AC 71 ms
71,256 KB
testcase_02 AC 74 ms
75,624 KB
testcase_03 AC 72 ms
71,176 KB
testcase_04 AC 71 ms
71,152 KB
testcase_05 AC 72 ms
71,344 KB
testcase_06 AC 71 ms
71,292 KB
testcase_07 AC 74 ms
75,764 KB
testcase_08 AC 77 ms
75,968 KB
testcase_09 AC 75 ms
75,872 KB
testcase_10 AC 77 ms
75,840 KB
testcase_11 AC 76 ms
75,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ans = 0

for x in range(1, N+1):
    if x%3==1:
        ans += x
    elif x%3==2:
        ans += x*x
    else:
        ans += x*x*x
    
print(ans)
0