結果
| 問題 |
No.1161 Many Powers
|
| ユーザー |
|
| 提出日時 | 2020-08-13 15:45:16 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 227 bytes |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 17,568 KB |
| 最終ジャッジ日時 | 2024-10-09 19:16:39 |
| 合計ジャッジ時間 | 4,008 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | AC * 3 TLE * 1 -- * 19 |
ソースコード
a,b,c=map(int,input().split())
ans=0
if a<=c:
for i in range(1,a+1):
ans+=pow(i,b,c)
ans%=c
else:
for i in range(1,a+1):
if i>c:
i%=c
ans+=pow(i,b,c)
ans%=c
print(ans)