結果

問題 No.1819 Mirrored 2
ユーザー Mitarushi
提出日時 2022-01-21 23:44:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,110 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 472 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 76,928 KB
最終ジャッジ日時 2024-11-26 05:53:00
合計ジャッジ時間 14,510 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

import random

P, Q, x , y = map(int, input().split())

def reverse(x):
    return int(str(x)[::-1])

while True:
    k = random.randint(0, 10 ** 100)
    rev_N = k * Q + y
    if rev_N % 10 == 0:
        continue
    N = reverse(rev_N)
    if N % P == x:
        print(N)
        break
    
0