結果
| 問題 | No.296 n度寝 | 
| コンテスト | |
| ユーザー |  rhincodon66 | 
| 提出日時 | 2018-09-08 19:35:01 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 392 bytes | 
| コンパイル時間 | 1,745 ms | 
| コンパイル使用メモリ | 166,032 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-12-17 18:36:08 | 
| 合計ジャッジ時間 | 2,484 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 16 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define rep(i,n) for(int i=0;i<(n);++i)
int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n,h,m,t;cin >> n >> h >> m >> t;
	int m1=(n-1)*t;
	int h1=(m1/60)%24;
	m1%=60;
	int ansm,ansh;
	if(m1+m>=60){
		h1++;
	}
	ansm=(m1+m)%60;
	ansh=(h1+h)%24;
	cout << ansh << endl;
	cout << ansm << endl;
}
            
            
            
        