結果

問題 No.717 ファッションへのこだわり
ユーザー apahie
提出日時 2019-04-22 23:17:16
言語 Nim
(2.2.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 3,558 ms
コンパイル使用メモリ 70,580 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-01 23:17:31
合計ジャッジ時間 4,072 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import sequtils, strutils, tables

let
  n = stdin.readLine.split.map parseInt
  s, t = stdin.readLine
var s_cnt, t_cnt = initCountTable[char]()

for c in s:
  s_cnt.inc c
for c in t:
  t_cnt.inc c

echo min(s_cnt['A'], t_cnt['A']) + min(s_cnt['B'], t_cnt['B'])
0