結果

問題 No.296 n度寝
コンテスト
ユーザー kachipan
提出日時 2023-06-23 16:25:48
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
実行時間 -
コード長 473 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 191 ms
コンパイル使用メモリ 41,812 KB
最終ジャッジ日時 2026-02-22 10:55:59
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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