結果

問題 No.3079 アルベド
ユーザー etale.K3etale.K3
提出日時 2021-10-25 23:10:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 565 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 15,392 KB
最終ジャッジ日時 2024-04-14 19:53:37
合計ジャッジ時間 4,788 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 171 ms
15,388 KB
testcase_01 AC 565 ms
15,388 KB
testcase_02 AC 388 ms
15,388 KB
testcase_03 AC 290 ms
15,388 KB
testcase_04 AC 456 ms
15,392 KB
testcase_05 AC 363 ms
15,392 KB
testcase_06 AC 425 ms
15,392 KB
testcase_07 AC 157 ms
15,388 KB
testcase_08 AC 184 ms
15,392 KB
testcase_09 AC 348 ms
15,392 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