結果

問題 No.2226 Hello, Forgotten World!
ユーザー tails
提出日時 2023-02-24 23:02:54
言語 Perl
(5.40.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 06:00:28
合計ジャッジ時間 731 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
Scalar value @-[0] better written as $-[0] at Main.pl line 8.
Main.pl syntax OK

ソースコード

diff #

<>;
while(<>){
	$_=<>;
	if(/helloworld/){
	}elsif(/.*\K[h?][e?][l?][l?][o?][w?][o?][r?][l?][d?]/){
		@a=();
		$a=$_;
		$p=@-[0];
		for$i($p-10..$p){
			if($i>=0){
				$_=$a;
				pos=$i;
				if(s/\G[h?][e?][l?][l?][o?][w?][o?][r?][l?][d?]/helloworld/){
					push@a,$_;
				}
			}
		}
		($_)=sort@a;
	}else{
		$_="-1\n";
	}
	y/?/a/;
	print;
}
0