結果

問題 No.239 にゃんぱすー
ユーザー nCk_cvnCk_cv
提出日時 2015-08-02 02:19:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 220 ms / 2,000 ms
コード長 550 bytes
コンパイル時間 1,956 ms
コンパイル使用メモリ 71,408 KB
実行使用メモリ 59,964 KB
最終ジャッジ日時 2023-09-25 00:30:06
合計ジャッジ時間 9,999 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,952 KB
testcase_01 AC 122 ms
55,556 KB
testcase_02 AC 120 ms
55,864 KB
testcase_03 AC 123 ms
55,368 KB
testcase_04 AC 121 ms
55,772 KB
testcase_05 AC 122 ms
55,800 KB
testcase_06 AC 119 ms
55,504 KB
testcase_07 AC 128 ms
55,688 KB
testcase_08 AC 126 ms
55,764 KB
testcase_09 AC 131 ms
55,896 KB
testcase_10 AC 160 ms
56,220 KB
testcase_11 AC 178 ms
58,040 KB
testcase_12 AC 169 ms
56,264 KB
testcase_13 AC 172 ms
56,596 KB
testcase_14 AC 173 ms
56,044 KB
testcase_15 AC 176 ms
56,336 KB
testcase_16 AC 178 ms
56,840 KB
testcase_17 AC 180 ms
58,876 KB
testcase_18 AC 192 ms
58,784 KB
testcase_19 AC 191 ms
58,552 KB
testcase_20 AC 198 ms
59,380 KB
testcase_21 AC 195 ms
58,556 KB
testcase_22 AC 201 ms
58,460 KB
testcase_23 AC 198 ms
57,224 KB
testcase_24 AC 214 ms
59,628 KB
testcase_25 AC 213 ms
59,620 KB
testcase_26 AC 217 ms
59,744 KB
testcase_27 AC 129 ms
56,184 KB
testcase_28 AC 164 ms
56,336 KB
testcase_29 AC 166 ms
54,380 KB
testcase_30 AC 161 ms
56,376 KB
testcase_31 AC 180 ms
56,648 KB
testcase_32 AC 186 ms
58,616 KB
testcase_33 AC 193 ms
58,288 KB
testcase_34 AC 201 ms
58,968 KB
testcase_35 AC 209 ms
59,432 KB
testcase_36 AC 220 ms
59,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[][] list = new String[n][n];
		int sum = 0;
		int id  = -1;
		for(int i = 0; i < n; i++) {
			for(int j = 0; j < n; j++) {
				list[i][j] = sc.next();
			}
		}
		IN:for(int i = 0; i < n; i++) {
			for(int j = 0; j < n; j++) {
				if(i == j) continue;
				if(!list[j][i].equals("nyanpass")) continue IN;
			}
			sum++;
			id = i;
		}
		if(sum != 1) id = -2;
		System.out.println((id+1));
		
		
		
		
	}
}
0