結果

問題 No.63 ポッキーゲーム
ユーザー togaerrortogaerror
提出日時 2015-05-03 22:18:58
言語 Perl
(5.38.2)
結果
AC  
実行時間 5 ms / 5,000 ms
コード長 196 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 5,296 KB
実行使用メモリ 5,128 KB
最終ジャッジ日時 2023-08-25 18:51:15
合計ジャッジ時間 1,135 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
4,840 KB
testcase_01 AC 5 ms
4,896 KB
testcase_02 AC 5 ms
5,112 KB
testcase_03 AC 5 ms
5,084 KB
testcase_04 AC 5 ms
4,964 KB
testcase_05 AC 5 ms
5,112 KB
testcase_06 AC 4 ms
5,088 KB
testcase_07 AC 5 ms
4,956 KB
testcase_08 AC 5 ms
5,072 KB
testcase_09 AC 5 ms
4,812 KB
testcase_10 AC 5 ms
5,032 KB
testcase_11 AC 5 ms
4,836 KB
testcase_12 AC 4 ms
5,016 KB
testcase_13 AC 5 ms
5,128 KB
testcase_14 AC 5 ms
4,960 KB
testcase_15 AC 5 ms
5,004 KB
testcase_16 AC 5 ms
5,032 KB
testcase_17 AC 5 ms
5,068 KB
testcase_18 AC 5 ms
4,940 KB
testcase_19 AC 5 ms
5,040 KB
testcase_20 AC 5 ms
4,820 KB
testcase_21 AC 4 ms
5,088 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

#!/usr/bin/evn perl

use strict;
use warnings;

my ($l, $k) = split / /, <>;
my $ans = $l / (2 * $k);
if($ans == int $l / (2 * $k)) {
	$ans--;
}
$ans = int $ans;
$ans *= $k;
print "$ans\n";

exit;
0