結果

問題 No.347 微分と積分
ユーザー cielciel
提出日時 2016-02-27 12:33:05
言語 Ruby
(3.3.0)
結果
AC  
実行時間 81 ms / 5,000 ms
コード長 105 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 11,552 KB
実行使用メモリ 15,676 KB
最終ジャッジ日時 2023-08-27 06:13:34
合計ジャッジ時間 3,225 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
15,560 KB
testcase_01 AC 81 ms
15,464 KB
testcase_02 AC 76 ms
15,568 KB
testcase_03 AC 76 ms
15,564 KB
testcase_04 AC 76 ms
15,332 KB
testcase_05 AC 77 ms
15,480 KB
testcase_06 AC 76 ms
15,576 KB
testcase_07 AC 74 ms
15,576 KB
testcase_08 AC 74 ms
15,676 KB
testcase_09 AC 76 ms
15,508 KB
testcase_10 AC 76 ms
15,600 KB
testcase_11 AC 77 ms
15,508 KB
testcase_12 AC 76 ms
15,380 KB
testcase_13 AC 77 ms
15,504 KB
testcase_14 AC 75 ms
15,400 KB
testcase_15 AC 75 ms
15,504 KB
testcase_16 AC 77 ms
15,636 KB
testcase_17 AC 76 ms
15,420 KB
testcase_18 AC 75 ms
15,392 KB
testcase_19 AC 78 ms
15,432 KB
testcase_20 AC 78 ms
15,492 KB
testcase_21 AC 76 ms
15,440 KB
testcase_22 AC 77 ms
15,364 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

_,b,*a=$<.read.split.map &:to_f
x=y=0
a.map{|e|x+=e*b**(e-1);y+=e!=-1?b**(e+1)/(e+1):Math.log(b)}
p x
p y
0