結果
問題 | No.1273 はじめのζ関数 |
ユーザー | Re_menal2 |
提出日時 | 2020-10-31 00:35:27 |
言語 | Ruby (3.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 229 bytes |
コンパイル時間 | 233 ms |
コンパイル使用メモリ | 11,348 KB |
実行使用メモリ | 56,904 KB |
最終ジャッジ日時 | 2023-09-29 09:33:39 |
合計ジャッジ時間 | 25,270 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | RE | - |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | RE | - |
testcase_18 | RE | - |
testcase_19 | RE | - |
testcase_20 | AC | 82 ms
15,040 KB |
testcase_21 | TLE | - |
testcase_22 | RE | - |
testcase_23 | RE | - |
testcase_24 | RE | - |
testcase_25 | RE | - |
testcase_26 | TLE | - |
testcase_27 | TLE | - |
testcase_28 | TLE | - |
testcase_29 | TLE | - |
testcase_30 | TLE | - |
testcase_31 | RE | - |
testcase_32 | TLE | - |
testcase_33 | RE | - |
testcase_34 | RE | - |
testcase_35 | RE | - |
testcase_36 | TLE | - |
testcase_37 | TLE | - |
testcase_38 | RE | - |
testcase_39 | RE | - |
testcase_40 | RE | - |
コンパイルメッセージ
Syntax OK
ソースコード
x = gets.to_i cnt = 0 one = 1.to_f ans = 0 if x==2 ans = 10 ** 6 end if x != 2 for i in 1..10000 key = one / (i ** x) cnt += ((1 / i) - key) * (one / (i - 1)) end ans = cnt * (10 ** 6) end print(ans.floor)