結果

問題 No.1819 Mirrored 2
コンテスト
ユーザー aaaaaaaaaa2230
提出日時 2022-01-22 11:05:30
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
RE  
実行時間 -
コード長 311 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 227 ms
コンパイル使用メモリ 85,736 KB
実行使用メモリ 82,920 KB
最終ジャッジ日時 2026-05-21 12:21:53
合計ジャッジ時間 3,545 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other RE * 26
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

now = y
while True:
    cand = int(str(now)[::-1])
    if cand%p == x:
        break
    now += q

for i in range(p):
    if pow(10,i,p) == now:
        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