結果

問題 No.1273 はじめのζ関数
ユーザー tanimani364
提出日時 2021-04-01 20:21:57
言語 PyPy3
(8.0.1 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 136 ms / 2,000 ms
+ 550µs
コード長 439 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,418 ms
コンパイル使用メモリ 64,000 KB
実行使用メモリ 60,808 KB
最終ジャッジ日時 2026-11-11 01:51:13
合計ジャッジ時間 8,268 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 42
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/usr/bin/env python3
#coding:utf-8

import math
import string
import random
import heapq
from sys import stdin
# import numpy as np
# from matplotlib import pyplot as plt

def main():
	read=stdin.readline

	#edit here!
	x=int(read())
	if x==2:
		print(1000000)
		return
	ans=0
	
	for i in range(2,1000000):
		res=0
		res+=math.pow(i,1-x)

		res/=i-1
		ans+=res

	ans*=1000000
	ans=int(ans)
	print(ans)
if __name__ == '__main__':
	main()
0