結果
問題 |
No.2920 Blood Type
|
ユーザー |
|
提出日時 | 2024-10-16 22:24:29 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 105 ms / 2,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 162 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-10-16 22:24:34 |
合計ジャッジ時間 | 4,595 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 36 |
コンパイルメッセージ
Syntax OK
ソースコード
def gi; gets.to_i; end def gc; gets.chomp; end def gsi; gets.split.map(&:to_i); end def pyn(b); puts(b ? 'Yes' : 'No'); end s = gc.chars t = gc.chars ans = [0] * 4 s.each do |i| t.each do |j| u = (i + j).chars.sort * '' if u == "AB" then ans[2] += 25 elsif u == "OO" then ans[3] += 25 elsif u[0] == 'A' then ans[0] += 25 else ans[1] += 25 end end end puts ans * ' '