結果

問題 No.2226 Hello, Forgotten World!
ユーザー tailstails
提出日時 2023-02-24 23:02:54
言語 Perl
(5.38.2)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 5,148 KB
実行使用メモリ 4,832 KB
最終ジャッジ日時 2023-10-11 06:48:07
合計ジャッジ時間 976 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,592 KB
testcase_01 AC 3 ms
4,792 KB
testcase_02 AC 3 ms
4,620 KB
testcase_03 AC 3 ms
4,656 KB
testcase_04 AC 3 ms
4,500 KB
testcase_05 AC 3 ms
4,688 KB
testcase_06 AC 2 ms
4,648 KB
testcase_07 AC 3 ms
4,664 KB
testcase_08 AC 2 ms
4,832 KB
testcase_09 AC 3 ms
4,800 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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