結果

問題 No.296 n度寝
ユーザー gotutiyan
提出日時 2017-09-29 15:24:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 609 bytes
コンパイル時間 912 ms
コンパイル使用メモリ 78,064 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-15 19:54:08
合計ジャッジ時間 1,414 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <fstream>
#include <set>
#include <utility>
#include <algorithm>

#define rep(i,p,n) for(int i=p;i<n;i++)
#define lli long long int
#define vi vector<int> 

using namespace std;

int max(int x, int y) {
	int a;
	(x > y) ? a = x : a = y;
	return a;
}

int min(int x, int y) {
	int a;
	(x < y) ? a = x : a = y;
	return a;
}

int main() {
	int n, h, m, t;
	cin >> n >> h >> m >> t;
	n--;

	int time = 0;
	time = h * 60 + m;

	time += n*t;

	int ttime = time%1440;

	cout << ttime / 60 << endl<< ttime % 60 << endl;
	

	return 0;
}
0