結果
| 問題 |
No.296 n度寝
|
| コンテスト | |
| ユーザー |
どらら
|
| 提出日時 | 2017-03-30 23:17:07 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 1,000 ms |
| コード長 | 628 bytes |
| コンパイル時間 | 1,505 ms |
| コンパイル使用メモリ | 167,768 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-07 03:15:00 |
| 合計ジャッジ時間 | 2,482 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).end()
typedef long long ll;
typedef unsigned long long ull;
pair<int,int> add(int H, int M, int T){
int ret = H*60+M + T;
ret %= 24*60;
return make_pair(ret/60, ret%60);
}
int main(){
int N, H, M, T;
cin >> N >> H >> M >> T;
rep(i,N-1){
pair<int,int> res = add(H, M, T);
H = res.first;
M = res.second;
}
cout << H << endl;
cout << M << endl;
return 0;
}
どらら