結果

問題 No.717 ファッションへのこだわり
ユーザー bluemeganebluemegane
提出日時 2018-09-05 17:18:53
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 544 bytes
コンパイル時間 763 ms
コンパイル使用メモリ 103,192 KB
実行使用メモリ 26,492 KB
最終ジャッジ日時 2024-04-27 14:35:26
合計ジャッジ時間 1,631 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
23,844 KB
testcase_01 AC 22 ms
24,228 KB
testcase_02 AC 21 ms
22,188 KB
testcase_03 AC 22 ms
24,240 KB
testcase_04 AC 22 ms
23,856 KB
testcase_05 AC 21 ms
22,068 KB
testcase_06 AC 27 ms
24,412 KB
testcase_07 AC 26 ms
24,696 KB
testcase_08 AC 26 ms
24,672 KB
testcase_09 AC 27 ms
25,052 KB
testcase_10 AC 28 ms
26,256 KB
testcase_11 AC 27 ms
26,488 KB
testcase_12 AC 27 ms
26,492 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, ma) + Math.Min(nb, mb));
    }
    public static int getA(string s) => s.Length - s.Replace("A", "").Length;
}
0