結果
問題 | No.516 赤と青の風船 |
ユーザー | neko_the_shadow |
提出日時 | 2021-09-01 10:25:35 |
言語 | Perl (5.38.2) |
結果 |
AC
|
実行時間 | 6 ms / 2,000 ms |
コード長 | 363 bytes |
コンパイル時間 | 342 ms |
コンパイル使用メモリ | 5,300 KB |
実行使用メモリ | 5,120 KB |
最終ジャッジ日時 | 2023-08-18 06:38:34 |
合計ジャッジ時間 | 1,243 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 6 ms
4,828 KB |
testcase_01 | AC | 5 ms
4,860 KB |
testcase_02 | AC | 6 ms
5,116 KB |
testcase_03 | AC | 5 ms
4,928 KB |
testcase_04 | AC | 6 ms
5,112 KB |
testcase_05 | AC | 6 ms
5,004 KB |
testcase_06 | AC | 6 ms
4,944 KB |
testcase_07 | AC | 6 ms
5,120 KB |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
use strict; use warnings; use feature qw/say state/; sub input() { state @que; if (@que == 0) { chomp(my $line = <>); push @que, split / /, $line; } return shift @que; } my $red = 0; my $blue = 0; foreach(0..2) { my $s = input; $red++ if ($s eq "RED"); $blue++ if ($s eq "BLUE"); } say($blue < $red ? "RED" : "BLUE");