結果

問題 No.497 入れ子の箱
コンテスト
ユーザー 👑 tails
提出日時 2017-03-24 19:52:16
言語 Perl
(5.42.1)
コンパイル:
perl -cw _filename_
実行:
perl -X _filename_
結果
WA  
実行時間 -
コード長 273 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 156 ms
コンパイル使用メモリ 5,888 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-08-08 21:12:50
合計ジャッジ時間 2,043 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 29
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #
raw source code

# validator
# WA ==> OK
# RE ==> NG

$_=<>;
die if not /^\d+\n/ && $_ >= 1 && $_ <= 1000;
$n=$_;
while(<>){
	die if not /^(\d+) (\d+) (\d+)\n/;
	die if not $1 >= 1 && $1 < 1e8;
	die if not $2 >= 1 && $2 < 1e8;
	die if not $3 >= 1 && $3 < 1e8;
	++$c;
}
die if not $c == $n;
0