結果

問題 No.1161 Many Powers
ユーザー ああいいああいい
提出日時 2021-12-29 00:26:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 539 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 13,824 KB
最終ジャッジ日時 2024-04-14 03:06:37
合計ジャッジ時間 6,057 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,624 KB
testcase_01 AC 32 ms
10,624 KB
testcase_02 AC 32 ms
10,624 KB
testcase_03 AC 34 ms
10,752 KB
testcase_04 AC 30 ms
10,624 KB
testcase_05 AC 49 ms
11,008 KB
testcase_06 AC 48 ms
10,880 KB
testcase_07 AC 29 ms
10,624 KB
testcase_08 AC 229 ms
11,904 KB
testcase_09 AC 239 ms
12,032 KB
testcase_10 AC 105 ms
11,136 KB
testcase_11 AC 169 ms
11,648 KB
testcase_12 AC 94 ms
11,136 KB
testcase_13 AC 297 ms
12,032 KB
testcase_14 AC 480 ms
13,312 KB
testcase_15 AC 398 ms
12,416 KB
testcase_16 AC 516 ms
12,416 KB
testcase_17 AC 341 ms
12,160 KB
testcase_18 AC 226 ms
12,032 KB
testcase_19 AC 131 ms
11,520 KB
testcase_20 AC 539 ms
13,824 KB
testcase_21 AC 138 ms
11,008 KB
testcase_22 AC 508 ms
11,520 KB
testcase_23 AC 30 ms
10,624 KB
testcase_24 AC 30 ms
10,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

q = A // C
r = A % C
dat = [q] * C
for i in range(r+1):
    dat[i] += 1
ans = 0
for i in range(1,C):
    ans += dat[i] * pow(i,B,C)
    ans %=  C
print(ans)
0