結果

問題 No.3079 アルベド
ユーザー 👑 NachiaNachia
提出日時 2021-04-23 20:28:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 275 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 328 ms
コンパイル使用メモリ 87,340 KB
実行使用メモリ 78,424 KB
最終ジャッジ日時 2023-09-17 11:18:36
合計ジャッジ時間 3,384 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
78,100 KB
testcase_01 AC 275 ms
78,424 KB
testcase_02 AC 210 ms
78,096 KB
testcase_03 AC 176 ms
78,272 KB
testcase_04 AC 240 ms
78,412 KB
testcase_05 AC 203 ms
78,220 KB
testcase_06 AC 231 ms
78,064 KB
testcase_07 AC 129 ms
77,924 KB
testcase_08 AC 143 ms
77,920 KB
testcase_09 AC 200 ms
78,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P = [1]*100001
P[0] = 0
P[1] = 0
for i in range(350):
    if P[i] == 1:
        for j in range(i*i,100001,i):
            P[j] = 0
for i in range(100000):
    P[i+1] += P[i]

T = int(input())
for t in range(T):
    N = int(input())
    print(P[N])
0