結果

問題 No.91 赤、緑、青の石
ユーザー %20%20
提出日時 2018-06-01 15:31:10
言語 Perl
(5.38.2)
結果
AC  
実行時間 784 ms / 5,000 ms
コード長 244 bytes
コンパイル時間 589 ms
コンパイル使用メモリ 5,332 KB
実行使用メモリ 5,368 KB
最終ジャッジ日時 2023-09-06 12:38:10
合計ジャッジ時間 9,227 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 531 ms
5,276 KB
testcase_01 AC 351 ms
5,368 KB
testcase_02 AC 199 ms
5,188 KB
testcase_03 AC 392 ms
5,256 KB
testcase_04 AC 187 ms
5,316 KB
testcase_05 AC 448 ms
5,164 KB
testcase_06 AC 49 ms
5,224 KB
testcase_07 AC 6 ms
5,064 KB
testcase_08 AC 5 ms
5,252 KB
testcase_09 AC 6 ms
5,252 KB
testcase_10 AC 6 ms
5,216 KB
testcase_11 AC 126 ms
5,168 KB
testcase_12 AC 421 ms
5,112 KB
testcase_13 AC 488 ms
5,164 KB
testcase_14 AC 308 ms
5,128 KB
testcase_15 AC 494 ms
5,196 KB
testcase_16 AC 6 ms
5,164 KB
testcase_17 AC 6 ms
5,192 KB
testcase_18 AC 6 ms
5,056 KB
testcase_19 AC 5 ms
5,236 KB
testcase_20 AC 6 ms
5,240 KB
testcase_21 AC 6 ms
5,128 KB
testcase_22 AC 6 ms
5,252 KB
testcase_23 AC 5 ms
5,252 KB
testcase_24 AC 5 ms
5,340 KB
testcase_25 AC 784 ms
5,340 KB
testcase_26 AC 758 ms
5,352 KB
testcase_27 AC 6 ms
5,168 KB
testcase_28 AC 7 ms
5,160 KB
testcase_29 AC 12 ms
5,212 KB
testcase_30 AC 506 ms
5,224 KB
testcase_31 AC 707 ms
5,196 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($x,$b,$c)=sort{$a-$b}glob<>;
$b-=$x;
$c-=$x;
while(1){
	if($b<=$c){
		if($b>=1&&$c>=3){
			++$x;
			--$b;
			$c-=3
		}else{
			last
		}
	}else{
		if($b>=3&&$c>=1){
			++$x;
			--$c;
			$b-=3
		}else{
			last
		}
	}
}
print$x+($b/5|0)+($c/5|0)
0