結果

問題 No.296 n度寝
コンテスト
ユーザー sayu
提出日時 2016-05-01 22:08:31
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 798 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 658 ms
コンパイル使用メモリ 96,932 KB
実行使用メモリ 6,144 KB
最終ジャッジ日時 2026-03-28 16:57:33
合計ジャッジ時間 1,249 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;

#define rep(i,x) for(int i=0;i<(int)(x);++i)
#define reps(i,x) for(int i=1;i<=(int)(x);++i)
#define rrep(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define rreps(i,x) for(int i=((int)(x));i>0;i--)
#define pb push_back

int n, h, m, t;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n >> h >> m >> t;
    int now = h*60 + m;
    rep(i, n-1) now += t;
    cout << (now/60)%24 << "\n" << now%60 << "\n";
    return 0;
}
0