結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,216 KB
testcase_01 AC 82 ms
15,192 KB
testcase_02 AC 80 ms
15,160 KB
testcase_03 AC 79 ms
15,244 KB
testcase_04 AC 83 ms
15,300 KB
testcase_05 AC 80 ms
15,216 KB
testcase_06 AC 83 ms
15,292 KB
testcase_07 AC 84 ms
15,236 KB
testcase_08 AC 79 ms
15,148 KB
testcase_09 AC 88 ms
15,268 KB
testcase_10 AC 84 ms
15,172 KB
testcase_11 AC 109 ms
15,136 KB
testcase_12 AC 616 ms
18,096 KB
testcase_13 AC 616 ms
18,112 KB
testcase_14 AC 111 ms
15,260 KB
testcase_15 AC 80 ms
15,292 KB
testcase_16 AC 80 ms
15,292 KB
testcase_17 AC 606 ms
17,492 KB
testcase_18 AC 303 ms
16,504 KB
testcase_19 AC 215 ms
16,056 KB
testcase_20 AC 130 ms
15,960 KB
testcase_21 AC 141 ms
16,128 KB
testcase_22 AC 83 ms
15,144 KB
testcase_23 AC 84 ms
15,328 KB
testcase_24 AC 89 ms
15,408 KB
testcase_25 AC 87 ms
15,176 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= ~/$/
s=0
$.>1&&l.times{|i|s+=$_[i].hex*f[l-1,l-i]/f[i]}&&p(d[s])
0