結果

問題 No.1273 はじめのζ関数
コンテスト
ユーザー kohei2019
提出日時 2023-06-13 01:26:04
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 418 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 160 ms
コンパイル使用メモリ 85,524 KB
実行使用メモリ 53,340 KB
最終ジャッジ日時 2026-03-05 05:00:13
合計ジャッジ時間 2,666 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 40
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#import mpmath

x = int(input())
if x >= 21:
    print(0)
    exit()
dic = {2: 1000000, 3: 355065, 4: 153009, 5: 70685, 6: 33758, 7: 16414, 8: 8065, 9: 3988, 10: 1979, 11: 985, 12: 491, 13: 245, 14: 122, 15: 61, 16: 30, 17: 15, 18: 7, 19: 3, 20: 1}
print(dic[x])
'''
dic = dict()
for k in range(2,21):
    ans_ = 1
    for i in range(2,k):
        ans_ -= mpmath.zeta(i,1)-1
    dic[k] = int(ans_*10**6)
print(dic)
'''
0