結果

問題 No.99 ジャンピング駒
ユーザー tonyu0tonyu0
提出日時 2020-03-29 17:36:18
言語 Perl
(5.38.2)
結果
AC  
実行時間 249 ms / 5,000 ms
コード長 103 bytes
コンパイル時間 617 ms
コンパイル使用メモリ 5,296 KB
実行使用メモリ 26,044 KB
最終ジャッジ日時 2023-08-30 19:53:41
合計ジャッジ時間 2,466 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 206 ms
25,876 KB
testcase_01 AC 211 ms
25,872 KB
testcase_02 AC 216 ms
26,044 KB
testcase_03 AC 229 ms
25,924 KB
testcase_04 AC 249 ms
25,872 KB
testcase_05 AC 230 ms
25,940 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

my $n=<>;
$odd+=$_%2 for glob<>;

if ($odd * 2 > $n) {
    print$odd*2-$n
} else {
    print$n-$odd*2
}
0