結果

問題 No.1183 コイン遊び
ユーザー bluemeganebluemegane
提出日時 2020-08-29 07:12:37
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 339 ms / 2,000 ms
コード長 576 bytes
コンパイル時間 2,461 ms
コンパイル使用メモリ 103,168 KB
実行使用メモリ 98,244 KB
最終ジャッジ日時 2024-04-26 16:03:44
合計ジャッジ時間 13,336 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
17,792 KB
testcase_01 AC 22 ms
17,920 KB
testcase_02 AC 21 ms
17,792 KB
testcase_03 AC 22 ms
17,664 KB
testcase_04 AC 21 ms
17,792 KB
testcase_05 AC 21 ms
17,664 KB
testcase_06 AC 21 ms
17,792 KB
testcase_07 AC 23 ms
17,792 KB
testcase_08 AC 27 ms
18,304 KB
testcase_09 AC 26 ms
18,176 KB
testcase_10 AC 29 ms
20,096 KB
testcase_11 AC 38 ms
22,656 KB
testcase_12 AC 208 ms
69,632 KB
testcase_13 AC 191 ms
65,188 KB
testcase_14 AC 311 ms
92,756 KB
testcase_15 AC 333 ms
96,196 KB
testcase_16 AC 324 ms
98,244 KB
testcase_17 AC 331 ms
96,116 KB
testcase_18 AC 331 ms
96,124 KB
testcase_19 AC 338 ms
96,112 KB
testcase_20 AC 333 ms
95,992 KB
testcase_21 AC 328 ms
95,988 KB
testcase_22 AC 337 ms
96,128 KB
testcase_23 AC 325 ms
96,252 KB
testcase_24 AC 329 ms
96,116 KB
testcase_25 AC 339 ms
96,108 KB
testcase_26 AC 332 ms
95,864 KB
testcase_27 AC 336 ms
96,240 KB
testcase_28 AC 336 ms
96,000 KB
testcase_29 AC 329 ms
95,984 KB
testcase_30 AC 319 ms
96,140 KB
testcase_31 AC 336 ms
96,124 KB
testcase_32 AC 336 ms
96,376 KB
testcase_33 AC 330 ms
98,116 KB
testcase_34 AC 335 ms
96,208 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
{
    static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        getAns(n);
    }
    static void getAns (int n)
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        string[] line2 = Console.ReadLine().Trim().Split(' ');
        var count = 0;
        var pre = true;
        for (int i = 0; i < n; i++)
        {
            var t = line[i] == line2[i];
            if (t && !pre) count++;
            pre = t;
        }
        if (!pre) count++;
        Console.WriteLine(count);
    }
}
0