結果

問題 No.1514 Squared Matching
ユーザー 👑 tamatotamato
提出日時 2021-05-21 22:20:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 3,298 ms / 4,000 ms
コード長 531 bytes
コンパイル時間 414 ms
コンパイル使用メモリ 82,756 KB
実行使用メモリ 467,096 KB
最終ジャッジ日時 2024-04-18 15:54:35
合計ジャッジ時間 79,885 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,347 ms
466,824 KB
testcase_01 AC 3,237 ms
466,740 KB
testcase_02 AC 2,350 ms
466,428 KB
testcase_03 AC 2,346 ms
467,048 KB
testcase_04 AC 2,348 ms
466,472 KB
testcase_05 AC 2,329 ms
466,880 KB
testcase_06 AC 2,365 ms
466,740 KB
testcase_07 AC 2,542 ms
466,944 KB
testcase_08 AC 3,206 ms
467,056 KB
testcase_09 AC 3,070 ms
466,608 KB
testcase_10 AC 3,133 ms
466,892 KB
testcase_11 AC 3,180 ms
466,608 KB
testcase_12 AC 3,179 ms
466,688 KB
testcase_13 AC 3,210 ms
466,688 KB
testcase_14 AC 3,210 ms
466,736 KB
testcase_15 AC 3,235 ms
467,052 KB
testcase_16 AC 3,249 ms
466,848 KB
testcase_17 AC 3,298 ms
466,740 KB
testcase_18 AC 3,292 ms
467,096 KB
testcase_19 AC 3,266 ms
466,808 KB
testcase_20 AC 3,219 ms
466,916 KB
testcase_21 AC 3,249 ms
466,764 KB
testcase_22 AC 2,524 ms
466,800 KB
testcase_23 AC 2,714 ms
466,592 KB
testcase_24 AC 2,881 ms
467,040 KB
testcase_25 AC 3,064 ms
466,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353
NN = 5*10**7
eps = 10**-9


def main():
    import sys
    from math import sqrt, floor
    input = sys.stdin.readline

    P_list = [1] * (NN+1)
    for p in range(2, NN+1):
        if P_list[p] == 1:
            for d in range(1, NN+1):
                if p*d > NN:
                    break
                P_list[p*d] *= p

    N = int(input())
    ans = 0
    for a in range(1, N+1):
        if P_list[a] == a:
            ans += floor(sqrt(N // a)) ** 2
    print(ans)


if __name__ == '__main__':
    main()
0