結果
問題 | No.371 ぼく悪いプライムじゃないよ |
ユーザー | mkawa2 |
提出日時 | 2021-09-24 16:24:32 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,164 bytes |
コンパイル時間 | 211 ms |
コンパイル使用メモリ | 10,996 KB |
実行使用メモリ | 14,120 KB |
最終ジャッジ日時 | 2023-09-18 20:16:43 |
合計ジャッジ時間 | 4,524 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 17 ms
12,872 KB |
testcase_01 | AC | 17 ms
8,504 KB |
testcase_02 | AC | 16 ms
8,064 KB |
testcase_03 | AC | 16 ms
8,476 KB |
testcase_04 | WA | - |
testcase_05 | AC | 17 ms
8,456 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 16 ms
8,544 KB |
testcase_09 | AC | 17 ms
8,220 KB |
testcase_10 | AC | 17 ms
8,176 KB |
testcase_11 | WA | - |
testcase_12 | AC | 16 ms
8,208 KB |
testcase_13 | AC | 16 ms
8,140 KB |
testcase_14 | AC | 16 ms
8,076 KB |
testcase_15 | WA | - |
testcase_16 | AC | 16 ms
8,188 KB |
testcase_17 | AC | 16 ms
8,428 KB |
testcase_18 | AC | 16 ms
8,584 KB |
testcase_19 | AC | 16 ms
8,416 KB |
testcase_20 | AC | 19 ms
8,072 KB |
testcase_21 | AC | 17 ms
8,168 KB |
testcase_22 | AC | 135 ms
8,120 KB |
testcase_23 | AC | 19 ms
8,136 KB |
testcase_24 | AC | 49 ms
9,680 KB |
testcase_25 | TLE | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
testcase_43 | -- | - |
testcase_44 | -- | - |
testcase_45 | -- | - |
ソースコード
import sys # sys.setrecursionlimit(200005) int1 = lambda x: int(x)-1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.readline()) def LI(): return list(map(int, sys.stdin.readline().split())) def LI1(): return list(map(int1, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def LLI1(rows_number): return [LI1() for _ in range(rows_number)] def SI(): return sys.stdin.readline().rstrip() dij = [(0, 1), (-1, 0), (0, -1), (1, 0)] # dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)] inf = 10**16 # md = 998244353 md = 10**9+7 l, h = LI() lim = round(h**0.5)+3 pp = [] isp = [True]*lim for p in range(2, lim): if isp[p]: pp.append(p) for c in range(p*p, lim, p): isp[c] = False fin = set() ans = mx = -1 for p in pp[::-1]: if p < mx: break L = (l+p-1)//p H = h//p+1 for a in range(L, H): for q in pp: if a*p%q == 0: if q == mx: if a*p > ans: ans = a*p if q > mx: mx = q ans = a*p break print(ans)