結果
| 問題 |
No.525 二度寝の季節
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2022-08-09 10:42:41 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 955 bytes |
| コンパイル時間 | 956 ms |
| コンパイル使用メモリ | 80,220 KB |
| 最終ジャッジ日時 | 2025-01-30 19:39:45 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 33 |
ソースコード
#include <iostream>
#include <list>
#include <vector>
#include <string>
#include <stdio.h>
#include <stdint.h>
#include <iomanip>
using namespace std;
using uint = unsigned int;
using ll = long long;
#define CIN( LL , A ) LL A; cin >> A
#define GETLINE( A ) string A; getline( cin , A )
#define FOR_ITR( ARRAY , ITR , END ) for( auto ITR = ARRAY .begin() , END = ARRAY .end() ; ITR != END ; ITR ++ )
int main()
{
CIN( string , T );
const string colon = ":";
bool b = false;
ll h = 0;
ll m = 0;
for( uint i = 0 ; i < 5 ; i++ ){
const string c = T.substr( i , 1 );
if( c == colon ){
b = true;
} else {
if( b ){
m = m * 10 + stoi( c );
} else {
h = h * 10 + stoi( c );
}
}
}
const ll time = h * 60 + m + 5;
const string answer = to_string( ( time / 60 ) % 24 + 100 ).substr( 1 ) + colon + to_string( time % 60 + 100 ).substr( 1 );
cout << answer << endl;
return 0;
}