結果

問題 No.1819 Mirrored 2
ユーザー hir355
提出日時 2022-01-07 23:53:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 82,244 KB
実行使用メモリ 58,240 KB
最終ジャッジ日時 2024-11-26 04:25:12
合計ジャッジ時間 2,949 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

p, q, x, y = map(int, input().split())
while y % 10 == 0 or int(str(y)[::-1]) % p == 0:
    y += q
ans = int(str(y)[::-1])
t = 0
while ans * pow(10, t, p) % p != x:
    t += 1
print(str(ans) + '0' * t)
0