結果

問題 No.296 n度寝
ユーザー yycoder
提出日時 2019-12-09 00:05:43
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 255 bytes
コンパイル時間 1,040 ms
コンパイル使用メモリ 23,936 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2025-01-02 20:59:59
合計ジャッジ時間 1,258 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 8
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |         scanf("%d%d%d%d", &n, &h, &m, &t);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>

int main()
{
	int n, h, m, t;
	int initime;
	int waketime;
	scanf("%d%d%d%d", &n, &h, &m, &t);
	initime = 60 * h + m;
	waketime = initime + (n - 1)*t;

	printf("%d\n%d\n", waketime / 60, waketime - 60 * (waketime / 60));
	
	return 0;
}
0