結果
| 問題 |
No.239 にゃんぱすー
|
| ユーザー |
|
| 提出日時 | 2019-04-29 21:25:12 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 114 ms / 2,000 ms |
| コード長 | 225 bytes |
| コンパイル時間 | 353 ms |
| コンパイル使用メモリ | 7,168 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-12-25 20:14:02 |
| 合計ジャッジ時間 | 6,334 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 33 |
コンパイルメッセージ
Main.rb:9: warning: `-' after local variable or literal is interpreted as binary operator Main.rb:9: warning: even though it seems like unary operator Main.rb:16: warning: ambiguous first argument; put parentheses or a space even after `-' operator Syntax OK
ソースコード
n = gets.to_i
as = []
n.times do
as << gets.split
end
bs = as.transpose
ans = []
bs.each_with_index do |b, i|
if b.count('nyanpass') == n -1
ans << i
end
end
if ans.count == 1
puts ans.first + 1
else
puts -1
end