結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2016-06-06 12:26:20 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 136 ms / 5,000 ms |
| コード長 | 182 bytes |
| コンパイル時間 | 212 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 17,664 KB |
| 最終ジャッジ日時 | 2024-06-26 07:56:20 |
| 合計ジャッジ時間 | 3,832 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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