結果

問題 No.538 N.G.S.
ユーザー motimoti
提出日時 2018-05-30 02:19:22
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 213 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 11,248 KB
実行使用メモリ 11,332 KB
最終ジャッジ日時 2023-09-12 20:34:12
合計ジャッジ時間 4,268 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
11,156 KB
testcase_01 AC 40 ms
11,316 KB
testcase_02 AC 40 ms
11,084 KB
testcase_03 AC 41 ms
11,136 KB
testcase_04 AC 41 ms
11,160 KB
testcase_05 AC 41 ms
11,112 KB
testcase_06 AC 41 ms
11,244 KB
testcase_07 AC 42 ms
11,028 KB
testcase_08 AC 41 ms
11,224 KB
testcase_09 AC 40 ms
11,056 KB
testcase_10 AC 41 ms
11,120 KB
testcase_11 AC 40 ms
11,024 KB
testcase_12 AC 41 ms
11,276 KB
testcase_13 AC 41 ms
11,116 KB
testcase_14 AC 41 ms
11,112 KB
testcase_15 AC 40 ms
11,240 KB
testcase_16 AC 40 ms
11,232 KB
testcase_17 AC 40 ms
11,232 KB
testcase_18 WA -
testcase_19 AC 40 ms
11,244 KB
testcase_20 AC 39 ms
11,116 KB
testcase_21 AC 40 ms
11,164 KB
testcase_22 AC 40 ms
11,172 KB
testcase_23 AC 40 ms
11,144 KB
testcase_24 AC 40 ms
11,332 KB
testcase_25 AC 40 ms
11,240 KB
testcase_26 AC 40 ms
11,240 KB
testcase_27 AC 40 ms
11,284 KB
testcase_28 AC 40 ms
11,280 KB
testcase_29 AC 40 ms
11,080 KB
testcase_30 AC 40 ms
11,196 KB
testcase_31 AC 40 ms
11,116 KB
testcase_32 AC 40 ms
11,160 KB
testcase_33 AC 40 ms
11,228 KB
testcase_34 AC 40 ms
11,264 KB
testcase_35 AC 40 ms
11,140 KB
testcase_36 AC 40 ms
11,148 KB
testcase_37 AC 41 ms
11,048 KB
testcase_38 AC 40 ms
11,244 KB
testcase_39 AC 40 ms
11,180 KB
testcase_40 AC 40 ms
11,144 KB
testcase_41 AC 40 ms
11,320 KB
testcase_42 AC 40 ms
11,052 KB
testcase_43 AC 39 ms
11,072 KB
testcase_44 AC 40 ms
11,160 KB
testcase_45 AC 40 ms
11,160 KB
testcase_46 AC 41 ms
11,228 KB
testcase_47 AC 41 ms
11,248 KB
testcase_48 AC 41 ms
11,316 KB
testcase_49 AC 41 ms
11,116 KB
testcase_50 AC 41 ms
11,056 KB
testcase_51 AC 41 ms
11,052 KB
testcase_52 AC 41 ms
11,144 KB
testcase_53 AC 40 ms
11,076 KB
testcase_54 AC 40 ms
11,244 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

#!/usr/bin/env perl

use bigint;

my ($b1, $b2, $b3) = split / /, <>; chomp $b3;
if ($b2 - $b1 == 0) {
  print $b1;
} else {
  my $r = ($b3 - $b2) / ($b2 - $b1);
  my $d = $b3 - $r * $b2;
  print $r * $b3 + $d;
}
0