結果
| 問題 | No.296 n度寝 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2024-11-09 15:06:13 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 1,000 ms | 
| コード長 | 296 bytes | 
| コンパイル時間 | 3,209 ms | 
| コンパイル使用メモリ | 80,508 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-09 15:06:17 | 
| 合計ジャッジ時間 | 2,159 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 16 | 
ソースコード
#include <iostream>
using namespace std;
int main() {
	int n,h,m,t;
	cin >> n >> h >> m >> t;
	
	for(int i = 1; i < n; i++) {
		int th = t / 60;
		int tm = t % 60;
		m += tm;
		if(m >= 60) {
			h += 1;
			m -= 60;
		}
		h += th;
		if(h > 23) {
			h -= 24;
		}
	}
	
	cout << h << endl << m;
	
}
            
            
            
        