結果
| 問題 | 
                            No.1273 はじめのζ関数
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-10-30 21:48:21 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 437 bytes | 
| コンパイル時間 | 336 ms | 
| コンパイル使用メモリ | 82,164 KB | 
| 実行使用メモリ | 85,572 KB | 
| 最終ジャッジ日時 | 2024-07-22 00:09:00 | 
| 合計ジャッジ時間 | 9,001 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | -- * 1 | 
| other | AC * 20 WA * 1 TLE * 1 -- * 18 | 
ソースコード
import sys
from math import floor
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7
def resolve():
    def f(n, k):
        res = 0
        for i in range(1, k):
            res += 1 / pow(i, n)
        return res
    x = int(input())
    res = 0
    for i in range(x, x + 100):
        res += f(i, 1000) - 1
    print(floor(res * 10 ** 6))
if __name__ == '__main__':
    resolve()