結果

問題 No.2193 メガの下1桁
ユーザー shobonvipshobonvip
提出日時 2023-01-13 22:34:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 312 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 71,512 KB
最終ジャッジ日時 2023-08-26 04:18:10
合計ジャッジ時間 4,700 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,036 KB
testcase_01 AC 64 ms
71,184 KB
testcase_02 AC 62 ms
71,388 KB
testcase_03 AC 64 ms
71,200 KB
testcase_04 AC 63 ms
71,196 KB
testcase_05 AC 67 ms
71,212 KB
testcase_06 WA -
testcase_07 AC 62 ms
71,176 KB
testcase_08 WA -
testcase_09 AC 64 ms
71,208 KB
testcase_10 AC 61 ms
71,312 KB
testcase_11 AC 66 ms
71,256 KB
testcase_12 AC 60 ms
71,300 KB
testcase_13 AC 64 ms
71,260 KB
testcase_14 AC 63 ms
71,144 KB
testcase_15 AC 63 ms
71,244 KB
testcase_16 AC 65 ms
71,072 KB
testcase_17 AC 64 ms
71,032 KB
testcase_18 WA -
testcase_19 AC 63 ms
71,028 KB
testcase_20 AC 60 ms
71,432 KB
testcase_21 WA -
testcase_22 AC 63 ms
71,352 KB
testcase_23 AC 63 ms
71,296 KB
testcase_24 AC 62 ms
71,068 KB
testcase_25 AC 61 ms
71,360 KB
testcase_26 AC 62 ms
71,176 KB
testcase_27 AC 62 ms
71,192 KB
testcase_28 AC 64 ms
71,076 KB
testcase_29 WA -
testcase_30 AC 63 ms
71,188 KB
testcase_31 WA -
testcase_32 AC 63 ms
71,320 KB
testcase_33 AC 62 ms
71,200 KB
testcase_34 AC 65 ms
71,224 KB
testcase_35 AC 61 ms
71,388 KB
testcase_36 AC 63 ms
71,072 KB
testcase_37 AC 62 ms
71,072 KB
testcase_38 AC 64 ms
71,036 KB
testcase_39 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

m = int(input())
d = int(input())
n = int(input())
b = int(input())
v = [[0] * b for i in range(60)]
for i in range(b):
	v[0][i] = pow(i+d, i, b)

for i in range(59):
	for j in range(b):
		v[i+1][j] = v[i][v[i][j]]

m %= b
for i in range(60):
	if (n >> i) & 1:
		m = v[i][m]

r = '0123456789ABCDEFG'

print(r[m])
0