結果

問題 No.296 n度寝
ユーザー Eclair1015
提出日時 2018-05-08 18:30:33
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 254 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 28,160 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 02:28:15
合計ジャッジ時間 685 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main(){
	int N;
	int H; //hour
	int M; //minute
	int T; //span(分ごと
	
	scanf("%d %d %d %d",&N,&H,&M,&T);
	
	M=(M+(N-1)*T);
	H=H+(M/60);	
	
	if(M>60){
		M=M%60;
	}
	
	if(H>=24){
		H=H%24;
	}
	printf("%d\n%d",H,M);
	return 0;
}
0