結果

問題 No.497 入れ子の箱
コンテスト
ユーザー 👑 tails
提出日時 2017-03-24 19:52:16
言語 Perl
(5.42.1)
コンパイル:
perl -cw _filename_
実行:
perl -X _filename_
結果
WA  
実行時間 -
コード長 273 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 283 ms
コンパイル使用メモリ 6,400 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-03-27 12:21:08
合計ジャッジ時間 1,382 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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