結果

問題 No.2920 Blood Type
ユーザー kou_kkk
提出日時 2024-11-30 22:11:32
言語 Nim
(2.2.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 314 bytes
コンパイル時間 3,967 ms
コンパイル使用メモリ 63,872 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-30 22:11:40
合計ジャッジ時間 5,105 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

import strutils

let
  s, t = readLine stdin
var
  ans = [0, 0, 0, 0]  # a b ab o

for x in s:
  for y in t:
    let
      set = {x, y}
    if set == {'O'}:
      ans[3].inc 25
    elif set == {'A', 'B'}:
      ans[2].inc 25
    elif 'A' in set:
      ans[0].inc 25
    else:
      ans[1].inc 25

echo ans.join " "
0