結果

問題 No.118 門松列(2)
ユーザー gigurururugigurururu
提出日時 2015-01-07 00:10:08
言語 Ruby
(3.2.2)
結果
AC  
実行時間 287 ms / 5,000 ms
コード長 131 bytes
コンパイル時間 66 ms
コンパイル使用メモリ 11,396 KB
実行使用メモリ 24,280 KB
最終ジャッジ日時 2023-08-27 05:25:50
合計ジャッジ時間 7,696 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
15,172 KB
testcase_01 AC 281 ms
24,044 KB
testcase_02 AC 281 ms
23,992 KB
testcase_03 AC 280 ms
24,064 KB
testcase_04 AC 287 ms
24,280 KB
testcase_05 AC 281 ms
24,140 KB
testcase_06 AC 83 ms
15,096 KB
testcase_07 AC 83 ms
15,132 KB
testcase_08 AC 83 ms
15,228 KB
testcase_09 AC 275 ms
22,724 KB
testcase_10 AC 243 ms
17,216 KB
testcase_11 AC 247 ms
17,824 KB
testcase_12 AC 242 ms
16,072 KB
testcase_13 AC 246 ms
15,784 KB
testcase_14 AC 280 ms
22,580 KB
testcase_15 AC 235 ms
15,444 KB
testcase_16 AC 255 ms
19,932 KB
testcase_17 AC 238 ms
15,484 KB
testcase_18 AC 241 ms
17,844 KB
testcase_19 AC 257 ms
19,612 KB
testcase_20 AC 256 ms
19,776 KB
testcase_21 AC 276 ms
21,600 KB
testcase_22 AC 245 ms
17,192 KB
testcase_23 AC 269 ms
20,260 KB
testcase_24 AC 247 ms
17,888 KB
testcase_25 AC 252 ms
18,980 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

mod=1000000007
gets
a=gets.split.group_by{|i|i}
p a.keys.combination(3).inject(0){|s,r|(s+r.inject(1){|t,i|(t*a[i].size)%mod})%mod}
0