結果

問題 No.1235 ζ関数
ユーザー TakaTaka
提出日時 2023-09-21 16:40:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 287 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 10,804 KB
実行使用メモリ 7,932 KB
最終ジャッジ日時 2023-09-21 16:40:11
合計ジャッジ時間 1,484 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 15 ms
7,840 KB
testcase_02 AC 15 ms
7,928 KB
testcase_03 AC 15 ms
7,880 KB
testcase_04 WA -
testcase_05 AC 14 ms
7,888 KB
testcase_06 AC 14 ms
7,756 KB
testcase_07 AC 14 ms
7,824 KB
testcase_08 AC 15 ms
7,784 KB
testcase_09 AC 15 ms
7,856 KB
testcase_10 AC 15 ms
7,760 KB
testcase_11 AC 15 ms
7,864 KB
testcase_12 AC 14 ms
7,856 KB
testcase_13 AC 14 ms
7,760 KB
testcase_14 AC 15 ms
7,788 KB
testcase_15 AC 14 ms
7,932 KB
testcase_16 WA -
testcase_17 AC 14 ms
7,784 KB
testcase_18 AC 14 ms
7,860 KB
testcase_19 AC 15 ms
7,788 KB
testcase_20 AC 15 ms
7,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def Riemann_zeta_function(N):
    result = 0.0
    num    = 1
    flag   = True
    
    while flag:
        result += 1/pow(num,N)
        
        if abs(result- int(result)) <= 10**(-10):
            flag = False
    return result
    
N = int(input())
print(Riemann_zeta_function(N))
0