結果
問題 |
No.1819 Mirrored 2
|
ユーザー |
|
提出日時 | 2022-01-21 22:09:24 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 577 bytes |
コンパイル時間 | 180 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 87,808 KB |
最終ジャッジ日時 | 2024-11-26 00:32:43 |
合計ジャッジ時間 | 3,162 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 23 WA * 2 RE * 1 |
ソースコード
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())) 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)