結果

問題 No.239 にゃんぱすー
ユーザー 双六双六
提出日時 2020-08-11 17:39:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 613 bytes
コンパイル時間 215 ms
コンパイル使用メモリ 82,608 KB
実行使用メモリ 57,248 KB
最終ジャッジ日時 2024-04-17 17:27:41
合計ジャッジ時間 2,512 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
54,160 KB
testcase_01 AC 33 ms
54,116 KB
testcase_02 AC 35 ms
53,940 KB
testcase_03 AC 34 ms
55,292 KB
testcase_04 AC 32 ms
54,356 KB
testcase_05 AC 32 ms
55,668 KB
testcase_06 AC 34 ms
54,372 KB
testcase_07 AC 35 ms
54,376 KB
testcase_08 AC 33 ms
54,096 KB
testcase_09 AC 37 ms
54,088 KB
testcase_10 AC 36 ms
54,096 KB
testcase_11 AC 34 ms
54,336 KB
testcase_12 AC 34 ms
54,168 KB
testcase_13 AC 34 ms
54,620 KB
testcase_14 AC 32 ms
54,992 KB
testcase_15 AC 32 ms
54,932 KB
testcase_16 AC 33 ms
55,772 KB
testcase_17 AC 33 ms
55,344 KB
testcase_18 AC 33 ms
55,116 KB
testcase_19 AC 33 ms
54,908 KB
testcase_20 AC 34 ms
56,284 KB
testcase_21 AC 34 ms
54,916 KB
testcase_22 AC 34 ms
57,048 KB
testcase_23 AC 34 ms
55,892 KB
testcase_24 AC 34 ms
56,328 KB
testcase_25 AC 35 ms
57,036 KB
testcase_26 AC 34 ms
56,748 KB
testcase_27 AC 32 ms
54,572 KB
testcase_28 AC 33 ms
54,248 KB
testcase_29 AC 33 ms
54,732 KB
testcase_30 AC 34 ms
54,676 KB
testcase_31 AC 34 ms
55,044 KB
testcase_32 AC 36 ms
55,960 KB
testcase_33 AC 34 ms
55,540 KB
testcase_34 AC 34 ms
55,488 KB
testcase_35 AC 34 ms
56,796 KB
testcase_36 AC 34 ms
57,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	D = defaultdict(int)
	A = []
	for i in range(N):
		a = list(input().split())
		A.append(a)
	for i in range(N):
		jud = 1
		for j in range(N):
			if i != j:
				if A[j][i] != "nyanpass":
					jud = 0
					break

		if jud == 1:
			D[i + 1] = 1

	if len(D) == 0 or len(D) >= 2:
		print(-1)

	else:
		for i in D:
			print(i)



if __name__ == '__main__':
	main()
0