結果

問題 No.3079 アルベド
ユーザー etale.K3etale.K3
提出日時 2021-10-25 23:10:57
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 505 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 10,596 KB
実行使用メモリ 12,580 KB
最終ジャッジ日時 2023-07-27 06:46:44
合計ジャッジ時間 5,660 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
12,580 KB
testcase_01 AC 505 ms
12,444 KB
testcase_02 AC 341 ms
12,392 KB
testcase_03 AC 259 ms
12,412 KB
testcase_04 AC 408 ms
12,312 KB
testcase_05 AC 317 ms
12,476 KB
testcase_06 AC 381 ms
12,396 KB
testcase_07 AC 131 ms
12,416 KB
testcase_08 AC 158 ms
12,452 KB
testcase_09 AC 304 ms
12,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A = [0] + [0] + [1]*(10**5+1)

for i in range(10**5+1):
    if A[i] == 1:
        for j in range(i+i,10**5+3,i):
            A[j] = 0

S = [0]*(10**5+3)

for i in range(1,10**5+1):
    S[i] = S[i-1] + A[i]


T = int(input())
for _ in range(T):
    print(S[int(input())])
0