結果

問題 No.239 にゃんぱすー
ユーザー fal_rndfal_rnd
提出日時 2017-08-08 17:42:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 233 ms / 2,000 ms
コード長 649 bytes
コンパイル時間 2,352 ms
コンパイル使用メモリ 78,756 KB
実行使用メモリ 58,204 KB
最終ジャッジ日時 2024-04-20 05:11:07
合計ジャッジ時間 10,158 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
53,768 KB
testcase_01 AC 124 ms
54,208 KB
testcase_02 AC 126 ms
54,276 KB
testcase_03 AC 113 ms
53,140 KB
testcase_04 AC 120 ms
54,088 KB
testcase_05 AC 111 ms
53,104 KB
testcase_06 AC 115 ms
53,672 KB
testcase_07 AC 126 ms
53,948 KB
testcase_08 AC 129 ms
54,204 KB
testcase_09 AC 137 ms
53,916 KB
testcase_10 AC 155 ms
54,352 KB
testcase_11 AC 162 ms
54,332 KB
testcase_12 AC 172 ms
54,280 KB
testcase_13 AC 172 ms
54,672 KB
testcase_14 AC 172 ms
54,312 KB
testcase_15 AC 176 ms
54,604 KB
testcase_16 AC 177 ms
54,768 KB
testcase_17 AC 179 ms
54,428 KB
testcase_18 AC 185 ms
56,724 KB
testcase_19 AC 190 ms
56,624 KB
testcase_20 AC 195 ms
56,912 KB
testcase_21 AC 193 ms
56,676 KB
testcase_22 AC 201 ms
56,620 KB
testcase_23 AC 233 ms
57,568 KB
testcase_24 AC 203 ms
57,760 KB
testcase_25 AC 198 ms
58,204 KB
testcase_26 AC 227 ms
57,928 KB
testcase_27 AC 126 ms
54,444 KB
testcase_28 AC 154 ms
54,312 KB
testcase_29 AC 178 ms
54,588 KB
testcase_30 AC 179 ms
54,340 KB
testcase_31 AC 182 ms
54,636 KB
testcase_32 AC 185 ms
56,816 KB
testcase_33 AC 181 ms
57,052 KB
testcase_34 AC 197 ms
57,144 KB
testcase_35 AC 202 ms
58,104 KB
testcase_36 AC 216 ms
58,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

class Main{
	static Scanner s=new Scanner(System.in);
	static int getInt(){return Integer.parseInt(s.next());}
	static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);}
	public static void main(String[]$){
		int n=getInt();
		List<Integer>r=REPS(1,n).boxed().collect(Collectors.toList());

		for(int l=0;l<n;++l) for(int i=1;i<=n;++i){
			String in=s.next();
			if(!(in.equals("-")||in.equals("nyanpass"))) {
				r.remove(Integer.valueOf(i));
			}
		}
		System.out.println(
				r.size()==1?r.get(0):-1
				);
	}
}
0