結果

問題 No.1273 はじめのζ関数
ユーザー rusa_dkrusa_dk
提出日時 2020-10-30 22:53:00
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 245 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 279 ms
使用メモリ 82,184 KB
最終ジャッジ日時 2023-02-21 15:28:44
合計ジャッジ時間 11,918 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 225 ms
81,272 KB
testcase_01 AC 225 ms
81,216 KB
testcase_02 AC 224 ms
81,200 KB
testcase_03 AC 227 ms
81,356 KB
testcase_04 AC 233 ms
81,324 KB
testcase_05 AC 233 ms
81,592 KB
testcase_06 AC 234 ms
81,548 KB
testcase_07 AC 233 ms
81,496 KB
testcase_08 AC 233 ms
81,496 KB
testcase_09 AC 232 ms
81,196 KB
testcase_10 AC 233 ms
81,524 KB
testcase_11 AC 229 ms
81,376 KB
testcase_12 AC 226 ms
81,276 KB
testcase_13 AC 226 ms
81,568 KB
testcase_14 AC 226 ms
81,336 KB
testcase_15 AC 225 ms
81,376 KB
testcase_16 AC 226 ms
81,344 KB
testcase_17 AC 227 ms
81,212 KB
testcase_18 AC 225 ms
81,308 KB
testcase_19 AC 226 ms
81,376 KB
testcase_20 AC 83 ms
75,516 KB
testcase_21 AC 237 ms
81,788 KB
testcase_22 AC 234 ms
81,776 KB
testcase_23 AC 235 ms
81,760 KB
testcase_24 AC 235 ms
81,688 KB
testcase_25 AC 235 ms
81,876 KB
testcase_26 AC 241 ms
81,788 KB
testcase_27 AC 239 ms
82,184 KB
testcase_28 AC 239 ms
81,784 KB
testcase_29 AC 238 ms
81,904 KB
testcase_30 AC 245 ms
81,712 KB
testcase_31 AC 236 ms
81,776 KB
testcase_32 AC 242 ms
81,772 KB
testcase_33 AC 238 ms
81,760 KB
testcase_34 AC 241 ms
81,944 KB
testcase_35 AC 236 ms
81,872 KB
testcase_36 AC 237 ms
81,880 KB
testcase_37 AC 238 ms
81,792 KB
testcase_38 AC 240 ms
81,856 KB
testcase_39 AC 241 ms
81,820 KB
testcase_40 AC 84 ms
75,780 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