結果

問題 No.239 にゃんぱすー
ユーザー Luoto-green
提出日時 2017-07-14 11:00:45
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 216 bytes
コンパイル時間 113 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 17,408 KB
最終ジャッジ日時 2024-10-07 20:40:48
合計ジャッジ時間 4,479 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 31 WA * 2
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.chomp.to_i
an = [""] * n
ans = []
while i = gets
  s = i.chomp.split
  n.times{|i| an[i] += " "+s[i]}
end
n.times{|i|ans << an[i].split.count("nyanpass")}
p ans.count(ans.max) > 1 ? -1 : ans.index(ans.max)+1
0