結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
togaerror
|
| 提出日時 | 2015-04-18 02:13:35 |
| 言語 | Perl (5.40.0) |
| 結果 |
AC
|
| 実行時間 | 38 ms / 5,000 ms |
| コード長 | 367 bytes |
| コンパイル時間 | 217 ms |
| コンパイル使用メモリ | 5,632 KB |
| 実行使用メモリ | 16,768 KB |
| 最終ジャッジ日時 | 2024-06-26 07:30:53 |
| 合計ジャッジ時間 | 1,520 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
#!/usr/bin/perl
use strict;
use warnings;
my $n = <>;
my $l = <>;
chomp $l;
my @array = split / /, $l;
my @count;
for(my $i = 0; $i < 7; $i++) {
$count[$i] = 0;
}
for(my $i = 0; $i < $n; $i++) {
$count[$array[$i]]++;
}
my $keep = 0;
my $j = 0;
for(my $i = 0; $i < 7; $i++) {
if($keep <= $count[$i]) {
$j = $i;
$keep = $count[$i];
}
}
print "$j\n";
exit;
togaerror