結果
| 問題 |
No.295 hel__world
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-10-23 23:21:44 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 260 bytes |
| コンパイル時間 | 70 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 14,336 KB |
| 最終ジャッジ日時 | 2024-07-23 15:50:49 |
| 合計ジャッジ時間 | 9,770 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 36 WA * 17 |
コンパイルメッセージ
Syntax OK
ソースコード
#!/usr/bin/ruby
S=gets.split.map(&:to_i)
h=[0]*26
gets.chomp.bytes{|b|
h[b-97]+=1
}
res=1
S.size.times{|i|
next if h[i]==0
d,r=S[i].divmod(h[i])
#p [S[i],h[i],d,r]
h[i].times{|j|
res*=d+(j<r ? 1 : 0)
if res>=2**62
puts :hel
exit
end
}
}
p res