結果

問題 No.1161 Many Powers
ユーザー roaris
提出日時 2020-08-12 16:54:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 149 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 82,124 KB
実行使用メモリ 61,648 KB
最終ジャッジ日時 2024-10-09 18:30:01
合計ジャッジ時間 2,974 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 3 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, C = map(int, input().split())
ans = 0

for i in range(1, A+1):
    if i>=C:
        break
    
    ans += pow(i, B, C)
    ans %= C

print(ans)
0