結果

問題 No.1819 Mirrored 2
ユーザー MitarushiMitarushi
提出日時 2022-01-21 23:44:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 818 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 352 ms
コンパイル使用メモリ 87,364 KB
実行使用メモリ 78,432 KB
最終ジャッジ日時 2023-08-17 10:00:00
合計ジャッジ時間 13,340 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 180 ms
78,208 KB
testcase_01 AC 153 ms
78,064 KB
testcase_02 AC 305 ms
78,432 KB
testcase_03 AC 178 ms
78,224 KB
testcase_04 AC 225 ms
78,416 KB
testcase_05 AC 265 ms
77,948 KB
testcase_06 AC 243 ms
78,164 KB
testcase_07 AC 351 ms
78,096 KB
testcase_08 AC 416 ms
78,212 KB
testcase_09 AC 455 ms
78,292 KB
testcase_10 AC 218 ms
78,080 KB
testcase_11 AC 299 ms
78,348 KB
testcase_12 AC 178 ms
77,840 KB
testcase_13 AC 139 ms
77,848 KB
testcase_14 AC 164 ms
78,340 KB
testcase_15 AC 96 ms
72,176 KB
testcase_16 AC 602 ms
78,212 KB
testcase_17 AC 108 ms
77,596 KB
testcase_18 AC 319 ms
78,192 KB
testcase_19 AC 319 ms
78,088 KB
testcase_20 AC 167 ms
78,336 KB
testcase_21 AC 122 ms
77,912 KB
testcase_22 AC 358 ms
78,108 KB
testcase_23 AC 442 ms
78,244 KB
testcase_24 AC 133 ms
77,872 KB
testcase_25 AC 258 ms
78,088 KB
testcase_26 AC 818 ms
78,136 KB
権限があれば一括ダウンロードができます

ソースコード

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