結果

問題 No.1273 はじめのζ関数
ユーザー rusa_dkrusa_dk
提出日時 2020-10-30 22:53:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 240 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 444 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 77,688 KB
最終ジャッジ日時 2023-09-29 07:57:05
合計ジャッジ時間 11,196 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 222 ms
76,588 KB
testcase_01 AC 223 ms
76,500 KB
testcase_02 AC 221 ms
76,432 KB
testcase_03 AC 225 ms
76,584 KB
testcase_04 AC 223 ms
76,536 KB
testcase_05 AC 221 ms
76,624 KB
testcase_06 AC 222 ms
76,436 KB
testcase_07 AC 223 ms
76,660 KB
testcase_08 AC 222 ms
76,664 KB
testcase_09 AC 221 ms
76,656 KB
testcase_10 AC 226 ms
76,608 KB
testcase_11 AC 224 ms
76,404 KB
testcase_12 AC 223 ms
76,628 KB
testcase_13 AC 223 ms
76,584 KB
testcase_14 AC 223 ms
76,436 KB
testcase_15 AC 222 ms
76,440 KB
testcase_16 AC 221 ms
76,416 KB
testcase_17 AC 226 ms
76,472 KB
testcase_18 AC 224 ms
76,416 KB
testcase_19 AC 224 ms
76,616 KB
testcase_20 AC 77 ms
71,288 KB
testcase_21 AC 233 ms
77,652 KB
testcase_22 AC 230 ms
77,340 KB
testcase_23 AC 235 ms
77,688 KB
testcase_24 AC 233 ms
77,332 KB
testcase_25 AC 233 ms
77,200 KB
testcase_26 AC 237 ms
77,132 KB
testcase_27 AC 238 ms
77,400 KB
testcase_28 AC 237 ms
77,396 KB
testcase_29 AC 237 ms
77,452 KB
testcase_30 AC 237 ms
77,364 KB
testcase_31 AC 240 ms
77,380 KB
testcase_32 AC 234 ms
77,356 KB
testcase_33 AC 233 ms
77,624 KB
testcase_34 AC 234 ms
77,372 KB
testcase_35 AC 239 ms
77,196 KB
testcase_36 AC 237 ms
77,372 KB
testcase_37 AC 238 ms
77,592 KB
testcase_38 AC 238 ms
77,564 KB
testcase_39 AC 235 ms
77,380 KB
testcase_40 AC 73 ms
71,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import pi
def zeta(x):
  if x==2:
    return pi*pi/6
  s=0
  for i in range(1,int((10**12)**(1/(x-1)))+2):
    s+=1/i**(x)
  return s
s=1
for i in range(2,int(input())):
  s-=zeta(i)-1
  #print(s,i)
print(int(s*1000000))
0