結果

問題 No.296 n度寝
ユーザー concon
提出日時 2018-11-10 17:53:16
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 446 bytes
コンパイル時間 622 ms
コンパイル使用メモリ 31,872 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-03 15:03:49
合計ジャッジ時間 931 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

implicit none
integer(8) A,B,C,m
integer(8),allocatable :: x(:)
allocate (x(4))
read(*,*) (x(m),m=1,4)
B=(x(1)-1)*x(4)
select case (B)
    case(:59)
        x(3)=x(3)+B
    case(60:)
        x(2)=x(2)+(B/60)
        B=B-(B/60)*60
        x(3)=x(3)+B
end select
if (x(3)>=60) then
    x(2)=x(2)+1
    x(3)=x(3)-60
end if
C=0
do while (x(2)>C)
   C=C+24
end do
x(2)=x(2)-C+24
if (x(2)==24) then
    x(2)=0
end if
write(*,*) x(2)
write(*,*) x(3)
end
0