結果
問題 | No.2244 Integer Complete |
ユーザー | shobonvip |
提出日時 | 2023-03-08 05:31:35 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,026 bytes |
コンパイル時間 | 171 ms |
コンパイル使用メモリ | 81,580 KB |
実行使用メモリ | 85,512 KB |
最終ジャッジ日時 | 2023-10-18 05:48:55 |
合計ジャッジ時間 | 5,058 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 39 ms
53,468 KB |
testcase_01 | AC | 38 ms
53,468 KB |
testcase_02 | AC | 39 ms
53,468 KB |
testcase_03 | AC | 39 ms
53,468 KB |
testcase_04 | AC | 39 ms
53,468 KB |
testcase_05 | AC | 40 ms
53,468 KB |
testcase_06 | AC | 40 ms
53,468 KB |
testcase_07 | AC | 39 ms
53,468 KB |
testcase_08 | AC | 44 ms
59,856 KB |
testcase_09 | AC | 46 ms
59,584 KB |
testcase_10 | AC | 38 ms
53,468 KB |
testcase_11 | AC | 39 ms
53,468 KB |
testcase_12 | AC | 38 ms
53,468 KB |
testcase_13 | AC | 38 ms
53,468 KB |
testcase_14 | AC | 39 ms
53,468 KB |
testcase_15 | AC | 39 ms
53,468 KB |
testcase_16 | AC | 39 ms
53,468 KB |
testcase_17 | AC | 57 ms
75,904 KB |
testcase_18 | AC | 58 ms
75,904 KB |
testcase_19 | TLE | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
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 | -- | - |
testcase_46 | -- | - |
testcase_47 | -- | - |
testcase_48 | -- | - |
testcase_49 | -- | - |
testcase_50 | -- | - |
testcase_51 | -- | - |
testcase_52 | -- | - |
testcase_53 | -- | - |
testcase_54 | -- | - |
testcase_55 | -- | - |
testcase_56 | -- | - |
testcase_57 | -- | - |
testcase_58 | -- | - |
testcase_59 | -- | - |
ソースコード
import bisect def makediv(n): lower_divisors , upper_divisors = [], [] i = 1 while i*i <= n: if n % i == 0: lower_divisors.append(i) if i != n // i: upper_divisors.append(n//i) i += 1 return lower_divisors + upper_divisors[::-1] n, m = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) assert 1 <= n <= 30000 assert 1 <= m <= 30000 for i in range(n): assert 1 <= a[i] <= 30000 for i in range(m): assert 1 <= b[i] <= 30000 for i in range(n-1): assert a[i] < a[i+1] for i in range(m-1): assert b[i] < b[i+1] a2 = [a[i] * a[i] for i in range(n)] b2 = [b[i] * b[i] for i in range(m)] if a[0] != 1 or b[0] != 1: print(1) exit() k = 1 while True: mode = 0 for i in makediv(k): j = k // i ar = 0 for x in range(n): if a[x] ** 2 <= i < (a[x] + 1) ** 2: ar = 1 if ar == 0: continue ar = 0 for y in range(m): if b[y] ** 2 <= j < (b[y] + 1) ** 2: ar = 1 if ar == 1: mode = 1 break if not mode: break k += 1 print(k)