結果

問題 No.1114 足し算盆に返らず
ユーザー 👑 timitimi
提出日時 2020-10-12 14:57:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 252 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 10,752 KB
実行使用メモリ 9,396 KB
最終ジャッジ日時 2023-09-27 23:39:03
合計ジャッジ時間 37,689 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 WA -
testcase_10 RE -
testcase_11 WA -
testcase_12 RE -
testcase_13 RE -
testcase_14 WA -
testcase_15 WA -
testcase_16 RE -
testcase_17 RE -
testcase_18 WA -
testcase_19 WA -
testcase_20 RE -
testcase_21 WA -
testcase_22 AC 14 ms
8,216 KB
testcase_23 AC 23 ms
8,748 KB
testcase_24 AC 28 ms
8,748 KB
testcase_25 AC 27 ms
8,772 KB
testcase_26 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
if N==1:
    print(1)
    exit()
D=[0]*(10**5+1)
A=[]
for i in range(2,N+1):
    if D[i]==0:
        A.append(i)
        n=i
        while n<=10**5:
            D[n]=1 
            n+=i
        for j in A:
            D[i+j]=1 
print(*A)
0