結果

問題 No.717 ファッションへのこだわり
ユーザー bluemeganebluemegane
提出日時 2018-09-05 17:16:06
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 544 bytes
コンパイル時間 670 ms
コンパイル使用メモリ 108,484 KB
実行使用メモリ 29,268 KB
最終ジャッジ日時 2024-04-27 14:35:21
合計ジャッジ時間 1,636 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
23,900 KB
testcase_01 AC 22 ms
26,144 KB
testcase_02 AC 22 ms
23,976 KB
testcase_03 AC 21 ms
23,972 KB
testcase_04 WA -
testcase_05 AC 23 ms
26,016 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 28 ms
24,496 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 26 ms
24,312 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class hello
{
    public static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var n = int.Parse(line[0]);
        var m = int.Parse(line[1]);
        var s = Console.ReadLine().Trim();
        var na = getA(s);
        var nb = n - na;
        var t = Console.ReadLine().Trim();
        var ma = getA(t);
        var mb = m - ma;
        Console.WriteLine(Math.Min(na, nb) + Math.Min(ma, mb));
    }
    public static int getA(string s) => s.Length - s.Replace("A", "").Length;
}
0