結果

問題 No.432 占い(Easy)
ユーザー mmmpppmmmppp
提出日時 2017-02-28 14:10:44
言語 Ruby
(3.3.0)
結果
AC  
実行時間 630 ms / 2,000 ms
コード長 138 bytes
コンパイル時間 864 ms
コンパイル使用メモリ 11,180 KB
実行使用メモリ 18,024 KB
最終ジャッジ日時 2023-09-02 16:23:09
合計ジャッジ時間 7,634 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,088 KB
testcase_01 AC 80 ms
15,164 KB
testcase_02 AC 80 ms
15,068 KB
testcase_03 AC 80 ms
15,084 KB
testcase_04 AC 85 ms
15,280 KB
testcase_05 AC 80 ms
15,272 KB
testcase_06 AC 82 ms
15,168 KB
testcase_07 AC 85 ms
15,084 KB
testcase_08 AC 81 ms
15,164 KB
testcase_09 AC 90 ms
15,228 KB
testcase_10 AC 84 ms
15,124 KB
testcase_11 AC 110 ms
15,268 KB
testcase_12 AC 630 ms
18,024 KB
testcase_13 AC 623 ms
17,892 KB
testcase_14 AC 108 ms
15,360 KB
testcase_15 AC 79 ms
15,288 KB
testcase_16 AC 79 ms
15,128 KB
testcase_17 AC 606 ms
17,572 KB
testcase_18 AC 298 ms
16,480 KB
testcase_19 AC 211 ms
16,236 KB
testcase_20 AC 129 ms
15,808 KB
testcase_21 AC 142 ms
16,224 KB
testcase_22 AC 83 ms
15,144 KB
testcase_23 AC 87 ms
15,256 KB
testcase_24 AC 88 ms
15,264 KB
testcase_25 AC 89 ms
15,384 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#!ruby -n
d=->n{n>9?d[n/10+n%10]:n}
f=->n,k=1{(k..n).reduce(:*)||1}
l= ~/$/
p d[l.times.reduce(0){|m,i|m+$_[i].hex*f[l-1,l-i]/f[i]}]if$.>1
0