結果

問題 No.1180 無限和
ユーザー uni_pythonuni_python
提出日時 2020-08-30 22:04:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 36 ms / 1,000 ms
コード長 819 bytes
コンパイル時間 518 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 54,252 KB
最終ジャッジ日時 2024-04-27 13:28:12
合計ジャッジ時間 3,381 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,016 KB
testcase_01 AC 33 ms
53,368 KB
testcase_02 AC 32 ms
52,928 KB
testcase_03 AC 33 ms
52,192 KB
testcase_04 AC 34 ms
53,128 KB
testcase_05 AC 33 ms
52,200 KB
testcase_06 AC 32 ms
52,512 KB
testcase_07 AC 31 ms
53,188 KB
testcase_08 AC 34 ms
54,236 KB
testcase_09 AC 34 ms
53,320 KB
testcase_10 AC 34 ms
53,644 KB
testcase_11 AC 34 ms
53,004 KB
testcase_12 AC 35 ms
53,592 KB
testcase_13 AC 34 ms
53,056 KB
testcase_14 AC 34 ms
52,756 KB
testcase_15 AC 36 ms
53,716 KB
testcase_16 AC 33 ms
52,592 KB
testcase_17 AC 32 ms
53,524 KB
testcase_18 AC 32 ms
53,824 KB
testcase_19 AC 32 ms
52,716 KB
testcase_20 AC 32 ms
54,252 KB
testcase_21 AC 34 ms
52,912 KB
testcase_22 AC 34 ms
52,908 KB
testcase_23 AC 32 ms
52,788 KB
testcase_24 AC 34 ms
53,796 KB
testcase_25 AC 33 ms
53,056 KB
testcase_26 AC 33 ms
53,204 KB
testcase_27 AC 33 ms
53,124 KB
testcase_28 AC 34 ms
52,788 KB
testcase_29 AC 36 ms
53,032 KB
testcase_30 AC 34 ms
52,260 KB
testcase_31 AC 33 ms
54,236 KB
testcase_32 AC 32 ms
53,008 KB
testcase_33 AC 33 ms
52,076 KB
testcase_34 AC 36 ms
52,952 KB
testcase_35 AC 33 ms
53,984 KB
testcase_36 AC 32 ms
52,260 KB
testcase_37 AC 32 ms
52,564 KB
testcase_38 AC 32 ms
53,060 KB
testcase_39 AC 33 ms
52,560 KB
testcase_40 AC 32 ms
53,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))


"""
知識0からだときつい
まずバーゼルは(pi^2)/6

これ,a2~aNまでは対称なのでa1をa2やらaNに置き換えても答えは同じはず.
差し替えたものを足して平均しても答えは同じになるはず.
全部を足すことで式をきれいにできる,というか同じようなものをいっぱい作れる

1/N * Σ...Σ ( 1/((a1^2)*B) ) + ... + ( 1/((an^2)*B) ) 
これは結局バーゼル問題の答えをN回かけている.
詳細は解説の通り
"""
def main():
    import math
    mod=10**9+7
    N=I()
    pi=math.pi
    ans=int((pow(pi,2*N))/(N*pow(6,N)))
    
    print(ans)
    
    



main()
0