結果

問題 No.598 オーバーフローファンタジー
ユーザー tailstails
提出日時 2017-11-24 22:27:42
言語 Perl
(5.38.0)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 109 bytes
コンパイル時間 442 ms
コンパイル使用メモリ 11,132 KB
実行使用メモリ 11,396 KB
最終ジャッジ日時 2023-08-26 22:21:30
合計ジャッジ時間 2,865 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
11,296 KB
testcase_01 AC 38 ms
11,224 KB
testcase_02 AC 38 ms
11,108 KB
testcase_03 AC 38 ms
11,088 KB
testcase_04 AC 39 ms
11,288 KB
testcase_05 AC 40 ms
11,396 KB
testcase_06 AC 38 ms
11,272 KB
testcase_07 AC 38 ms
11,220 KB
testcase_08 AC 41 ms
11,276 KB
testcase_09 AC 40 ms
11,088 KB
testcase_10 AC 39 ms
11,388 KB
testcase_11 AC 38 ms
11,396 KB
testcase_12 AC 39 ms
11,100 KB
testcase_13 AC 40 ms
11,112 KB
testcase_14 AC 40 ms
11,224 KB
testcase_15 AC 41 ms
11,284 KB
testcase_16 AC 40 ms
11,228 KB
testcase_17 AC 41 ms
11,376 KB
testcase_18 AC 39 ms
11,332 KB
testcase_19 AC 39 ms
11,292 KB
testcase_20 AC 39 ms
11,216 KB
testcase_21 AC 40 ms
11,140 KB
testcase_22 AC 39 ms
11,172 KB
testcase_23 AC 40 ms
11,288 KB
testcase_24 AC 40 ms
11,096 KB
testcase_25 AC 39 ms
11,100 KB
testcase_26 AC 38 ms
11,376 KB
testcase_27 AC 38 ms
11,228 KB
testcase_28 AC 40 ms
11,168 KB
testcase_29 AC 39 ms
11,084 KB
testcase_30 AC 39 ms
11,288 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use bigint;
$n=<>+0;
$x=<>+0;
$a=<>+0;
$b=<>+0;

$c=($x-1)/$a+1;
$d=(2**($n-1)-$x-1)/$b+1;
print $c<$d?$c:$d;
0