結果

問題 No.2099 [Cherry Alpha B] Time Machine
ユーザー tailstails
提出日時 2022-10-14 22:07:50
言語 Perl
(5.38.0)
結果
WA  
実行時間 -
コード長 279 bytes
コンパイル時間 468 ms
コンパイル使用メモリ 5,400 KB
実行使用メモリ 5,396 KB
最終ジャッジ日時 2023-09-08 21:48:50
合計ジャッジ時間 2,957 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,112 KB
testcase_01 AC 6 ms
5,196 KB
testcase_02 AC 6 ms
5,036 KB
testcase_03 AC 6 ms
5,052 KB
testcase_04 WA -
testcase_05 AC 6 ms
5,108 KB
testcase_06 AC 6 ms
5,184 KB
testcase_07 AC 6 ms
5,128 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 31 ms
5,168 KB
testcase_11 AC 10 ms
5,112 KB
testcase_12 WA -
testcase_13 AC 6 ms
5,248 KB
testcase_14 WA -
testcase_15 AC 6 ms
5,180 KB
testcase_16 AC 6 ms
5,180 KB
testcase_17 AC 6 ms
5,288 KB
testcase_18 AC 6 ms
5,116 KB
testcase_19 AC 6 ms
5,196 KB
testcase_20 AC 6 ms
5,172 KB
testcase_21 AC 6 ms
5,140 KB
testcase_22 WA -
testcase_23 AC 14 ms
5,112 KB
testcase_24 AC 6 ms
5,188 KB
testcase_25 AC 6 ms
5,128 KB
testcase_26 AC 6 ms
5,188 KB
testcase_27 AC 10 ms
5,176 KB
testcase_28 AC 6 ms
5,116 KB
testcase_29 WA -
testcase_30 AC 6 ms
5,168 KB
testcase_31 AC 6 ms
5,004 KB
testcase_32 AC 6 ms
5,060 KB
testcase_33 AC 6 ms
5,200 KB
testcase_34 WA -
testcase_35 AC 6 ms
5,196 KB
testcase_36 AC 6 ms
5,060 KB
testcase_37 AC 6 ms
5,180 KB
testcase_38 AC 6 ms
5,108 KB
testcase_39 AC 6 ms
5,112 KB
testcase_40 WA -
testcase_41 AC 6 ms
5,112 KB
testcase_42 AC 6 ms
5,304 KB
testcase_43 AC 8 ms
5,056 KB
testcase_44 AC 6 ms
5,040 KB
testcase_45 AC 6 ms
5,184 KB
testcase_46 WA -
testcase_47 AC 6 ms
5,112 KB
testcase_48 AC 6 ms
5,128 KB
testcase_49 WA -
testcase_50 AC 6 ms
5,248 KB
testcase_51 AC 6 ms
5,160 KB
testcase_52 AC 6 ms
5,036 KB
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
testcase_57 AC 6 ms
5,112 KB
testcase_58 AC 6 ms
5,264 KB
testcase_59 WA -
testcase_60 WA -
testcase_61 WA -
testcase_62 WA -
testcase_63 WA -
testcase_64 WA -
testcase_65 WA -
testcase_66 WA -
testcase_67 WA -
testcase_68 WA -
testcase_69 WA -
testcase_70 WA -
testcase_71 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Warning: Use of "int" without parentheses is ambiguous at Main.pl line 5.
Main.pl syntax OK

ソースコード

diff #

$t=<>;
($x,$a)=glob<>;
($y,$b)=glob<>;
if($t<0){
	$q=int+(1-$t)/$b+1;
	$c+=$q*$y;
	$t+=$q*$b;
}
{
	$q=int$t/$a;
	$c+=$q*$x;
	$t-=$q*$a;
	$d=$c+$t;
}
while(1){
	$t+=$y;
	$c+=$b;
	$q=int$t/$a;
	$c+=$q*$x;
	$t-=$q*$a;
	if($c>$d){
		last;
	}
	if($d>$c+$t){
		$d=$c+$t;
	}
}
print$d;
0