結果
| 問題 | No.239 にゃんぱすー |
| コンテスト | |
| ユーザー |
fV9TwBhUoa9S3eV
|
| 提出日時 | 2019-09-18 10:32:36 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 22 ms / 2,000 ms |
| + 57µs | |
| コード長 | 465 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 11,648 KB |
| 最終ジャッジ日時 | 2026-10-11 12:56:09 |
| 合計ジャッジ時間 | 2,441 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 34 |
ソースコード
# 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