結果

問題 No.1837 Same but Different
ユーザー tailstails
提出日時 2022-05-12 21:25:08
言語 Perl
(5.38.2)
結果
AC  
実行時間 5 ms / 2,000 ms
コード長 129 bytes
コンパイル時間 318 ms
コンパイル使用メモリ 5,300 KB
実行使用メモリ 5,328 KB
最終ジャッジ日時 2023-09-27 21:13:49
合計ジャッジ時間 2,130 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,424 KB
testcase_01 AC 3 ms
4,424 KB
testcase_02 AC 2 ms
4,464 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 5 ms
5,312 KB
testcase_05 AC 4 ms
5,288 KB
testcase_06 AC 4 ms
5,084 KB
testcase_07 AC 4 ms
5,080 KB
testcase_08 AC 5 ms
5,328 KB
testcase_09 AC 5 ms
5,288 KB
testcase_10 AC 4 ms
5,132 KB
testcase_11 AC 4 ms
5,264 KB
testcase_12 AC 5 ms
5,080 KB
testcase_13 AC 4 ms
5,132 KB
testcase_14 AC 5 ms
5,180 KB
testcase_15 AC 4 ms
4,772 KB
testcase_16 AC 3 ms
4,632 KB
testcase_17 AC 3 ms
4,688 KB
testcase_18 AC 4 ms
4,780 KB
testcase_19 AC 4 ms
4,824 KB
testcase_20 AC 3 ms
4,868 KB
testcase_21 AC 3 ms
4,860 KB
testcase_22 AC 3 ms
4,684 KB
testcase_23 AC 3 ms
4,716 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Scalar value @a[-1] better written as $a[-1] at Main.pl line 3.
Scalar value @a[-2] better written as $a[-2] at Main.pl line 4.
Main.pl syntax OK

ソースコード

diff #

$n=<>;
@a=(0,map($_*3+6+($_*3>$n*2)*3,2..$n));
@a[-1]+=(9,7,4)[$n%3];
@a[-2]+=(0,0,4)[$n%3];
@b=map($_*3+7,1..$n);
print"@a @b";
0