結果
| 問題 | 
                            No.239 にゃんぱすー
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Liny52551272
                         | 
                    
| 提出日時 | 2019-11-15 16:29:43 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 33 ms / 2,000 ms | 
| コード長 | 610 bytes | 
| コンパイル時間 | 192 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 11,008 KB | 
| 最終ジャッジ日時 | 2024-09-24 23:00:12 | 
| 合計ジャッジ時間 | 2,816 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 33 | 
ソースコード
a = lambda x : 1 if (x == 'nyanpass') or (x == '-') else 0
N = int(input().strip())
lst = []
for x in range(N):
  lst.append([a(i) for i in input().strip().split(' ')])
#print('lst:{}'.format(lst))
lst2 = [0 for i in range(len(lst))]
for i in lst:
  #print('i:{}'.format(i))
  for j in range(len(i)):
    lst2[j] += i[j]
#print('lst2:{}'.format(lst2))
cnt = 0
a = -2
for i in range(len(lst2)):
  #print('i:{} N:{}'.format(i, N))
  if lst2[i] == N:
    if cnt == 0:
      a = i
    else:
      a = -2
    cnt += 1
#print('cnt:{} a:{} N:{}'.format(cnt, a, N))
print(str(a + 1))
            
            
            
        
            
Liny52551272