結果

問題 No.8 N言っちゃダメゲーム
ユーザー togaerrortogaerror
提出日時 2015-04-18 15:57:52
言語 Perl
(5.38.2)
結果
AC  
実行時間 5 ms / 5,000 ms
コード長 262 bytes
コンパイル時間 197 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 5,104 KB
最終ジャッジ日時 2023-09-17 22:44:16
合計ジャッジ時間 1,084 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
4,936 KB
testcase_01 AC 5 ms
4,924 KB
testcase_02 AC 5 ms
5,088 KB
testcase_03 AC 5 ms
5,072 KB
testcase_04 AC 5 ms
4,976 KB
testcase_05 AC 5 ms
5,104 KB
testcase_06 AC 5 ms
4,872 KB
testcase_07 AC 5 ms
4,932 KB
testcase_08 AC 5 ms
5,020 KB
testcase_09 AC 5 ms
4,868 KB
testcase_10 AC 5 ms
4,924 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

#!/usr/bin/perl

use strict;
use warnings;

my $p = <>;
my @array;
for(my $i = 0; $i < $p; $i++) {
	my ($n, $k) = split / /, <>;
	if(($n - 1)%($k + 1) == 0) {
		$array[$i] = 'Lose';
	} else {
		$array[$i] = 'Win';
	}
}

foreach (@array) {
	print "$_\n";
}

exit;
0