結果

問題 No.1987 Sandglass Inconvenience
ユーザー 👑 H20H20
提出日時 2022-06-24 22:45:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,244 ms / 2,000 ms
コード長 391 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 82,556 KB
実行使用メモリ 80,292 KB
最終ジャッジ日時 2024-04-26 05:48:11
合計ジャッジ時間 16,527 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,888 KB
testcase_01 AC 1,244 ms
77,440 KB
testcase_02 AC 41 ms
54,988 KB
testcase_03 AC 40 ms
55,240 KB
testcase_04 AC 41 ms
54,864 KB
testcase_05 AC 41 ms
54,464 KB
testcase_06 AC 1,241 ms
78,840 KB
testcase_07 AC 1,242 ms
78,712 KB
testcase_08 AC 1,241 ms
77,312 KB
testcase_09 AC 1,241 ms
77,408 KB
testcase_10 AC 1,241 ms
79,132 KB
testcase_11 AC 1,242 ms
79,380 KB
testcase_12 AC 1,242 ms
80,292 KB
testcase_13 AC 1,243 ms
77,536 KB
testcase_14 AC 1,241 ms
77,184 KB
testcase_15 AC 41 ms
54,584 KB
testcase_16 AC 41 ms
54,476 KB
testcase_17 AC 1,241 ms
77,296 KB
testcase_18 AC 41 ms
54,272 KB
testcase_19 AC 39 ms
54,144 KB
testcase_20 AC 40 ms
53,888 KB
testcase_21 AC 40 ms
54,144 KB
testcase_22 AC 41 ms
53,888 KB
testcase_23 AC 40 ms
53,888 KB
testcase_24 AC 1,242 ms
77,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import random
import time
L = list(map(int, input().split()))
LS = set()
X = int(input())
stime = time.time()
while stime+1.2 > time.time():
    v1 = random.choice(L)
    v2 = random.choice(L)
    if X%v1==0 or X%v2==0:
        print('Yes')
        exit()
    else:
        v = max(v1,v2)%min(v1,v2)
        if v>0 and not v in LS:
            LS.add(v)
            L.append(v)
print('No')

0