結果

問題 No.73 helloworld
ユーザー sune232002sune232002
提出日時 2014-11-20 23:42:50
言語 Ruby
(3.3.0)
結果
AC  
実行時間 85 ms / 5,000 ms
コード長 228 bytes
コンパイル時間 60 ms
コンパイル使用メモリ 11,516 KB
実行使用メモリ 15,332 KB
最終ジャッジ日時 2023-09-11 07:25:34
合計ジャッジ時間 2,170 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,332 KB
testcase_01 AC 84 ms
15,252 KB
testcase_02 AC 79 ms
15,152 KB
testcase_03 AC 79 ms
15,296 KB
testcase_04 AC 80 ms
15,124 KB
testcase_05 AC 80 ms
15,236 KB
testcase_06 AC 80 ms
15,248 KB
testcase_07 AC 81 ms
15,008 KB
testcase_08 AC 80 ms
15,084 KB
testcase_09 AC 81 ms
15,152 KB
testcase_10 AC 81 ms
15,140 KB
testcase_11 AC 81 ms
15,044 KB
testcase_12 AC 80 ms
15,140 KB
testcase_13 AC 80 ms
15,040 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a = {}
26.times{|i|a[('a'.ord+i).chr]=gets.to_i}
ans = a['h'] * a['e'] * a['w'] * a['r'] * a['d']
ans *= (a['o']/2) * (a['o']-a['o']/2)
mx = 0
z = a['l']
0.upto(z){|i|
  mx = [mx, i*(i-1)/2*(z-i)].max
}
ans *= mx
p ans
0