結果

問題 No.1271 初めての級数
ユーザー 👑 hos.lyrichos.lyric
提出日時 2020-11-24 02:46:55
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 52 bytes
コンパイル時間 71 ms
コンパイル使用メモリ 11,232 KB
実行使用メモリ 15,340 KB
最終ジャッジ日時 2023-10-01 00:44:52
合計ジャッジ時間 2,218 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 84 ms
15,256 KB
testcase_02 AC 82 ms
15,340 KB
testcase_03 AC 84 ms
15,044 KB
testcase_04 AC 85 ms
15,080 KB
testcase_05 AC 88 ms
15,116 KB
testcase_06 AC 84 ms
15,008 KB
testcase_07 AC 84 ms
15,232 KB
testcase_08 AC 83 ms
15,240 KB
testcase_09 AC 82 ms
15,084 KB
testcase_10 AC 82 ms
15,092 KB
testcase_11 AC 82 ms
15,260 KB
testcase_12 AC 82 ms
15,236 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

k=gets.to_i
p k>0?(1..k).map{|x|1.0/x}.sum/k:1.64493
0