結果

問題 No.239 にゃんぱすー
ユーザー bluemeganebluemegane
提出日時 2018-09-25 20:51:52
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 31 ms / 2,000 ms
コード長 616 bytes
コンパイル時間 2,331 ms
コンパイル使用メモリ 113,784 KB
実行使用メモリ 27,232 KB
最終ジャッジ日時 2024-04-15 17:35:38
合計ジャッジ時間 3,877 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
26,644 KB
testcase_01 AC 26 ms
24,864 KB
testcase_02 AC 28 ms
26,716 KB
testcase_03 AC 28 ms
26,976 KB
testcase_04 AC 27 ms
24,628 KB
testcase_05 AC 27 ms
24,856 KB
testcase_06 AC 27 ms
26,844 KB
testcase_07 AC 27 ms
26,980 KB
testcase_08 AC 27 ms
26,772 KB
testcase_09 AC 27 ms
24,856 KB
testcase_10 AC 28 ms
26,648 KB
testcase_11 AC 27 ms
24,796 KB
testcase_12 AC 27 ms
25,052 KB
testcase_13 AC 28 ms
26,980 KB
testcase_14 AC 28 ms
27,232 KB
testcase_15 AC 28 ms
26,848 KB
testcase_16 AC 28 ms
26,976 KB
testcase_17 AC 28 ms
24,804 KB
testcase_18 AC 28 ms
24,940 KB
testcase_19 AC 27 ms
22,452 KB
testcase_20 AC 29 ms
26,896 KB
testcase_21 AC 28 ms
22,836 KB
testcase_22 AC 28 ms
22,840 KB
testcase_23 AC 29 ms
24,876 KB
testcase_24 AC 29 ms
24,884 KB
testcase_25 AC 31 ms
24,728 KB
testcase_26 AC 31 ms
27,024 KB
testcase_27 AC 28 ms
24,600 KB
testcase_28 AC 28 ms
26,900 KB
testcase_29 AC 27 ms
24,856 KB
testcase_30 AC 27 ms
24,736 KB
testcase_31 AC 28 ms
24,604 KB
testcase_32 AC 28 ms
24,800 KB
testcase_33 AC 28 ms
24,732 KB
testcase_34 AC 28 ms
24,804 KB
testcase_35 AC 30 ms
26,844 KB
testcase_36 AC 29 ms
24,928 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System.Linq;
using System;

public class Hello
{
    public static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        var a = new int[n];
        for (int i = 0; i < n; i++)
        {
            string[] line = Console.ReadLine().Trim().Split(' ');
            for (int j = 0; j < n; j++)
                if (line[j] == "nyanpass") a[j]++;
        }
        var b = a.Count(x => x == n - 1);
        if (b == 0 | b >= 2)  Console.WriteLine(-1); 
        else
            for (int i = 0; i < n; i++)
                if (a[i] == n - 1) { Console.WriteLine(i  + 1); break; }
    }
}
0