結果

問題 No.296 n度寝
ユーザー mizuyoukannKB
提出日時 2016-04-03 14:47:12
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 325 bytes
コンパイル時間 552 ms
コンパイル使用メモリ 54,136 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-02 12:36:53
合計ジャッジ時間 1,169 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11 WA * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |         scanf("%d %d %d %d", &n, &h, &m, &t);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <iostream>

using namespace std;

int main()
{
	unsigned int n, h, m, t, work;

	scanf("%d %d %d %d", &n, &h, &m, &t);

	work = t * (n - 1);

	int a = h + work / 60;
	int b = m + work;

	cout << ((h + work / 60) + (m + work > 60 ? work < 60 ? 1 : 0 : 0)) % 24 << endl;
	cout << (m + work) % 60 << endl;

	return 0;
}
0