結果

問題 No.1819 Mirrored 2
ユーザー shotoyooshotoyoo
提出日時 2022-01-21 22:11:17
言語 PyPy3
(7.3.15)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 600 bytes
コンパイル時間 862 ms
コンパイル使用メモリ 86,840 KB
実行使用メモリ 97,548 KB
最終ジャッジ日時 2023-08-17 09:21:58
合計ジャッジ時間 5,416 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
94,232 KB
testcase_01 AC 98 ms
94,516 KB
testcase_02 AC 98 ms
94,472 KB
testcase_03 AC 91 ms
94,224 KB
testcase_04 AC 92 ms
94,288 KB
testcase_05 AC 92 ms
94,320 KB
testcase_06 AC 93 ms
94,236 KB
testcase_07 AC 92 ms
94,352 KB
testcase_08 AC 93 ms
94,360 KB
testcase_09 AC 90 ms
94,312 KB
testcase_10 AC 91 ms
94,228 KB
testcase_11 AC 92 ms
94,356 KB
testcase_12 AC 92 ms
94,348 KB
testcase_13 AC 92 ms
94,356 KB
testcase_14 AC 95 ms
94,396 KB
testcase_15 AC 92 ms
94,136 KB
testcase_16 AC 90 ms
94,320 KB
testcase_17 AC 91 ms
94,392 KB
testcase_18 AC 92 ms
94,536 KB
testcase_19 AC 93 ms
94,132 KB
testcase_20 AC 93 ms
94,392 KB
testcase_21 AC 93 ms
94,228 KB
testcase_22 AC 93 ms
94,712 KB
testcase_23 AC 92 ms
94,208 KB
testcase_24 AC 92 ms
94,776 KB
testcase_25 AC 91 ms
94,320 KB
testcase_26 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda : sys.stdin.readline().rstrip()

write = lambda x: sys.stdout.write(x+"\n"); writef = lambda x: print("{:.12f}".format(x))
debug = lambda x: sys.stderr.write(x+"\n")
YES="Yes"; NO="No"; pans = lambda v: print(YES if v else NO)
LI = lambda : list(map(int, input().split()))
# sys.setrecursionlimit(3*10**5+10)

p,q,x,y = list(map(int, input().split()))
if y%10==0:
    y += q
v10 = [1]
index = {}
index[1] = 0
for i in range(p+10):
    v10.append(v10[-1]*10%p)
    index[v10[-1]] = i+1
n = int(str(y)[::-1])
val = (x*pow(n, p-2, p)) % p
i = index[val]
print(str(n) + "0" * i)
0