結果
問題 | No.239 にゃんぱすー |
ユーザー |
|
提出日時 | 2019-07-16 13:44:43 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 515 bytes |
コンパイル時間 | 150 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,520 KB |
最終ジャッジ日時 | 2024-11-30 14:14:31 |
合計ジャッジ時間 | 2,174 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 |
ソースコード
#!/usr/bin/python3#!coding:utf-8N=int(input())aisatsu_mat=[]candidate=[]for _i in range(N):aisatsu_mat.append(input().split())for person,i in zip (list(zip(*aisatsu_mat)), range(N)):#print(person,i)nyan=0for j in range (N):if j==i:continueif person[j] != "nyanpass":breakelse:nyan = nyan+1if nyan==N-1:candidate.append(i+1)if candidate==[] or len(candidate)>1:print("-1")else:print(candidate[0])