結果

問題 No.264 じゃんけん
ユーザー shiCanoko_oshiCanoko_o
提出日時 2019-05-16 13:43:18
言語 Perl
(5.38.2)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 367 bytes
コンパイル時間 730 ms
コンパイル使用メモリ 5,456 KB
実行使用メモリ 5,464 KB
最終ジャッジ日時 2023-10-17 06:52:04
合計ジャッジ時間 1,334 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

my $hand = <STDIN>;
chomp ($hand);

my @hands = split(/ /,$hand);

my $hand_me = $hands[0];
my $hand_you = $hands[1];

if($hand_me - $hand_you == 2){
    print "Won\n";

}elsif($hand_me - $hand_you == -1){
    print "Won\n";

}elsif($hand_me - $hand_you == -2){
    print "Lost\n";

}elsif($hand_me - $hand_you == 1){
    print "Lost\n";

}else{
    print "Drew\n";
}
0