結果
問題 | No.689 E869120 and Constructing Array 3 |
ユーザー | kobaya0514 |
提出日時 | 2018-05-18 23:49:28 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 517 bytes |
コンパイル時間 | 134 ms |
コンパイル使用メモリ | 10,908 KB |
実行使用メモリ | 15,996 KB |
最終ジャッジ日時 | 2023-09-10 23:23:00 |
合計ジャッジ時間 | 15,509 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 758 ms
15,860 KB |
testcase_01 | AC | 770 ms
15,836 KB |
testcase_02 | AC | 743 ms
15,820 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 770 ms
15,828 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 759 ms
15,892 KB |
testcase_11 | WA | - |
testcase_12 | AC | 775 ms
15,856 KB |
testcase_13 | AC | 774 ms
15,940 KB |
testcase_14 | AC | 766 ms
15,992 KB |
testcase_15 | AC | 758 ms
15,880 KB |
ソースコード
K=int(input()) prime=[True for _ in range(1000001)] prime[0]=False prime[1]=False ansp=[] for i in range(2,999999): if prime[i]: cnt=2 while i*cnt<1000001: prime[i*cnt]=False cnt+=1 if i<999999 and prime[i+2]: ansp.append(i) if len(ansp)>250: break ans2=0 ansprime=0 for i in range(1,250): for j in range(1,250): if i*j==K and i+j<=250: ans2=i ansprime=j ans=[2]*ans2+ansp[:ansprime] if K==0: print(1) print(2) else: print(len(ans)) print(*ans)