結果
| 問題 | No.79 過小評価ダメ・ゼッタイ |
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2016-06-06 12:26:20 |
| 言語 | Ruby (4.0.1) |
| 結果 |
AC
|
| 実行時間 | 77 ms / 5,000 ms |
| コード長 | 182 bytes |
| 記録 | |
| コンパイル時間 | 110 ms |
| コンパイル使用メモリ | 9,216 KB |
| 実行使用メモリ | 19,840 KB |
| 最終ジャッジ日時 | 2026-03-12 23:52:21 |
| 合計ジャッジ時間 | 2,466 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n Syntax OK
ソースコード
as=[0,0,0,0,0,0,0]
n=STDIN.gets.to_i
ls=STDIN.gets.split(" ")
ls.each do |e|
as[e.to_i]+=1
end
ans=0
cs=0
6.times do |i|
j=6-i
if as[j]>cs
cs=as[j]
ans=j
end
end
puts ans
horiesiniti