結果

問題 No.296 n度寝
ユーザー kachipankachipan
提出日時 2023-06-23 16:25:48
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 473 bytes
コンパイル時間 991 ms
コンパイル使用メモリ 28,356 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-13 11:17:56
合計ジャッジ時間 1,491 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 -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>

int main()
{
	int nidoneCnt = 0;
	int time = 0;
	int minutes = 0;
	int sleepTime = 0;

	scanf("%d", &nidoneCnt);
	scanf("%d", &time);
	scanf("%d", &minutes);
	scanf("%d", &sleepTime);

	sleepTime = (nidoneCnt - 1) * sleepTime;
	minutes += sleepTime;

	while (minutes >= 60)
	{
		minutes -= 60;
		time++;
		if (time > 23)
		{
			time = 0;
		}
	}

	printf("%d", time);
	printf("%d", minutes);
}

0