結果

問題 No.1819 Mirrored 2
ユーザー hir355hir355
提出日時 2022-01-07 23:53:38
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 86,964 KB
実行使用メモリ 76,012 KB
最終ジャッジ日時 2023-08-17 09:06:59
合計ジャッジ時間 4,390 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,376 KB
testcase_01 AC 82 ms
75,808 KB
testcase_02 AC 101 ms
75,828 KB
testcase_03 AC 91 ms
75,768 KB
testcase_04 AC 78 ms
75,768 KB
testcase_05 AC 89 ms
75,816 KB
testcase_06 AC 106 ms
75,764 KB
testcase_07 AC 100 ms
75,792 KB
testcase_08 AC 105 ms
75,792 KB
testcase_09 AC 78 ms
75,572 KB
testcase_10 AC 107 ms
75,808 KB
testcase_11 AC 86 ms
75,968 KB
testcase_12 AC 97 ms
75,864 KB
testcase_13 AC 92 ms
75,572 KB
testcase_14 AC 106 ms
75,800 KB
testcase_15 AC 81 ms
76,012 KB
testcase_16 AC 85 ms
75,604 KB
testcase_17 AC 97 ms
75,912 KB
testcase_18 AC 88 ms
75,872 KB
testcase_19 AC 88 ms
75,980 KB
testcase_20 AC 78 ms
75,604 KB
testcase_21 AC 78 ms
76,008 KB
testcase_22 AC 92 ms
75,864 KB
testcase_23 AC 86 ms
75,920 KB
testcase_24 AC 95 ms
75,972 KB
testcase_25 AC 86 ms
75,608 KB
testcase_26 AC 105 ms
75,932 KB
権限があれば一括ダウンロードができます

ソースコード

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