結果

問題 No.1819 Mirrored 2
ユーザー ああいいああいい
提出日時 2022-01-21 23:10:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 265 bytes
コンパイル時間 358 ms
コンパイル使用メモリ 87,340 KB
実行使用メモリ 80,252 KB
最終ジャッジ日時 2023-08-17 07:44:04
合計ジャッジ時間 7,424 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
75,776 KB
testcase_01 AC 77 ms
75,800 KB
testcase_02 AC 79 ms
75,836 KB
testcase_03 AC 78 ms
75,888 KB
testcase_04 AC 77 ms
76,080 KB
testcase_05 AC 79 ms
75,796 KB
testcase_06 AC 78 ms
75,744 KB
testcase_07 AC 75 ms
75,576 KB
testcase_08 AC 77 ms
75,816 KB
testcase_09 AC 76 ms
75,936 KB
testcase_10 AC 77 ms
75,808 KB
testcase_11 WA -
testcase_12 AC 77 ms
75,888 KB
testcase_13 AC 78 ms
75,900 KB
testcase_14 AC 79 ms
75,804 KB
testcase_15 AC 79 ms
75,728 KB
testcase_16 AC 79 ms
75,796 KB
testcase_17 AC 81 ms
75,580 KB
testcase_18 AC 79 ms
75,904 KB
testcase_19 AC 80 ms
75,788 KB
testcase_20 AC 80 ms
75,844 KB
testcase_21 WA -
testcase_22 AC 80 ms
75,820 KB
testcase_23 AC 78 ms
75,808 KB
testcase_24 AC 80 ms
75,876 KB
testcase_25 AC 76 ms
75,564 KB
testcase_26 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

P,Q,x,y = input().split()

rQ = Q[::-1]
ry = y[::-1]
x = int(x)
P = int(P)
ry = int(ry)
inv = pow(ry,P-2,P)
rQ = int(rQ)
u = inv * (x-rQ) % P
s = 1
now = 10
while now % P != u:
    s += 1
    now = now * 10 % P
ans = str(ry) + '0' * (s-len(Q)) + str(rQ)
print(ans)
0