結果

問題 No.296 n度寝
ユーザー shiCanoko_oshiCanoko_o
提出日時 2019-07-12 23:01:52
言語 Perl
(5.38.0)
結果
WA  
実行時間 -
コード長 463 bytes
コンパイル時間 318 ms
コンパイル使用メモリ 5,456 KB
実行使用メモリ 4,636 KB
最終ジャッジ日時 2023-08-12 03:41:44
合計ジャッジ時間 1,489 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::interval" used only once: possible typo at Main.pl line 3.
Main.pl syntax OK

ソースコード

diff #

if ($sleeps > 0){
    $sleeps -= 1;
    my $get_up_time = $interval * $sleeps;
    $minutes += $get_up_time;
    if ($minutes >= 60){
        my $count_hour;
        for ($count_hour = 0; $minutes > 60; $count_hour++){
            $minutes -= 60;
        }
        $hour += $count_hour;
        print "$hour\n";
        print "$minutes\n";
    }else{
        print "$hour\n";
        print "$minutes\n";
    }
}else{
    print "$hour\n";
    print "$minutes\n";
}
0