結果
| 問題 |
No.239 にゃんぱすー
|
| ユーザー |
fV9TwBhUoa9S3eV
|
| 提出日時 | 2019-09-18 10:32:36 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 2,000 ms |
| コード長 | 465 bytes |
| コンパイル時間 | 611 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 11,264 KB |
| 最終ジャッジ日時 | 2024-07-07 20:51:44 |
| 合計ジャッジ時間 | 3,277 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 33 |
ソースコード
# No.239 にゃんぱすー
n = int(input())
a = [input().split() for i in range(n)]
villegers = [0] * n
for i in range(n):
if a[0][i] == 'nyanpass' or a[0][i] == '-':
candidate = i
for j in range(n):
if j != i and a[j][i] != 'nyanpass':
candidate = -1
break
if candidate != - 1:
villegers[candidate] = 1
print(villegers.index(1) + 1 if villegers.count(1) == 1 else -1)
fV9TwBhUoa9S3eV