結果
問題 |
No.239 にゃんぱすー
|
ユーザー |
![]() |
提出日時 | 2017-09-19 19:49:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 466 bytes |
コンパイル時間 | 90 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-08 05:42:01 |
合計ジャッジ時間 | 2,483 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 WA * 9 RE * 8 |
ソースコード
import sys N = int(input()) A = [0]*5 cnt = 0 for i in range(N): A[i]=input().split() if A[i].count("nyanpass") >= 2: print(-1) sys.exit() elif A[i].count("nyanpass") == 0: cnt += 1 if cnt >= 2: print(-1) sys.exit() if A[0].count("nyanpass") > 0: if A[0].index("nyanpass")+1 == N: print("1") else: print(A[0].index("nyanpass")+1) else: print(A[1].index("nyanpass")+1)