結果

問題 No.333 門松列を数え上げ
ユーザー tsubaki961
提出日時 2016-05-21 17:41:08
言語 Perl
(5.40.0)
結果
WA  
実行時間 -
コード長 166 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 6,820 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-06 19:21:30
合計ジャッジ時間 571 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 4 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "list" may clash with future reserved word at Main.pl line 10.
Scalar value @list[0] better written as $list[0] at Main.pl line 4.
Scalar value @list[1] better written as $list[1] at Main.pl line 4.
Scalar value @list[1] better written as $list[1] at Main.pl line 4.
Name "main::list" used only once: possible typo at Main.pl line 10.
Main.pl syntax OK

ソースコード

diff #

use strict;
my $matsu = <STDIN>;
my @list = split(/ /,$matsu);
if(@list[0] > @list[1])
{
	print 2 * (10 ** 9) - @list[1] - 1,"\n";
}
else
{
	print list[1] - 2,"\n";
}
0