結果

問題 No.1819 Mirrored 2
ユーザー aaaaaaaaaa2230
提出日時 2022-01-22 12:02:10
言語 PyPy3
(7.3.15)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 322 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 82,204 KB
実行使用メモリ 70,352 KB
最終ジャッジ日時 2024-11-27 07:15:53
合計ジャッジ時間 3,954 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other RE * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

p,q,x,y = map(int,input().split())

now = y
while True:
    cand = int(str(now)[::-1])


    if cand%p and now%10:
        break
    now += q

for i in range(p):
    if pow(10,i,p) == cand%p:
        k = i
        break

for i in range(k,k+p):
    if pow(10,i,p) == x:
        l = i
        break

print(pow(10,l-k)*cand)
0