結果

問題 No.1273 はじめのζ関数
ユーザー tanimani364tanimani364
提出日時 2021-04-01 20:21:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 275 ms / 2,000 ms
コード長 439 bytes
コンパイル時間 416 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 81,792 KB
最終ジャッジ日時 2023-08-22 23:18:00
合計ジャッジ時間 12,904 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 247 ms
81,748 KB
testcase_01 AC 245 ms
81,552 KB
testcase_02 AC 246 ms
81,304 KB
testcase_03 AC 275 ms
81,404 KB
testcase_04 AC 247 ms
81,552 KB
testcase_05 AC 249 ms
81,348 KB
testcase_06 AC 245 ms
81,696 KB
testcase_07 AC 245 ms
81,616 KB
testcase_08 AC 243 ms
81,540 KB
testcase_09 AC 245 ms
81,356 KB
testcase_10 AC 242 ms
81,700 KB
testcase_11 AC 244 ms
81,532 KB
testcase_12 AC 247 ms
81,488 KB
testcase_13 AC 244 ms
81,536 KB
testcase_14 AC 248 ms
81,612 KB
testcase_15 AC 249 ms
81,636 KB
testcase_16 AC 246 ms
81,676 KB
testcase_17 AC 250 ms
81,600 KB
testcase_18 AC 247 ms
81,600 KB
testcase_19 AC 245 ms
81,492 KB
testcase_20 AC 170 ms
80,952 KB
testcase_21 AC 241 ms
81,468 KB
testcase_22 AC 239 ms
81,680 KB
testcase_23 AC 241 ms
81,724 KB
testcase_24 AC 243 ms
81,680 KB
testcase_25 AC 237 ms
81,492 KB
testcase_26 AC 241 ms
81,644 KB
testcase_27 AC 238 ms
81,592 KB
testcase_28 AC 242 ms
81,792 KB
testcase_29 AC 237 ms
81,692 KB
testcase_30 AC 239 ms
81,344 KB
testcase_31 AC 238 ms
81,644 KB
testcase_32 AC 237 ms
81,404 KB
testcase_33 AC 242 ms
81,404 KB
testcase_34 AC 242 ms
81,692 KB
testcase_35 AC 237 ms
81,400 KB
testcase_36 AC 237 ms
81,608 KB
testcase_37 AC 237 ms
81,396 KB
testcase_38 AC 237 ms
81,732 KB
testcase_39 AC 236 ms
81,464 KB
testcase_40 AC 244 ms
81,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/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