結果
| 問題 | No.651 E869120 and Driving | 
| コンテスト | |
| ユーザー |  kichirb3 | 
| 提出日時 | 2018-02-25 23:05:12 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 1,022 bytes | 
| コンパイル時間 | 990 ms | 
| コンパイル使用メモリ | 113,424 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-09-22 08:56:00 | 
| 合計ジャッジ時間 | 1,486 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 7 | 
ソースコード
// No.651 E869120 and Driving
// https://yukicoder.me/problems/no/651
//
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <regex>
#include <utility>
#include <unordered_map>
#include <map>
#include <set>
#include <regex>
#include <iomanip>
#include <sstream>
#include <array>
using namespace std;
string solve(int a);
int main() {
    int a;
    cin >> a;
    string ans = solve(a);
    cout << ans << endl;
}
string solve(int a) {
    int start_time = 10 * 60;   // 出発時刻 (00:00からの経過分)
    int arrive_time = start_time + (a * 60 / 100 ); // 到着時刻
    int arrive_mm = arrive_time % 60; // 到着時刻の分部分
    int arrive_hh = arrive_time - arrive_mm; // 到着時刻の時部分
    arrive_hh /= 60;
    arrive_hh %= 24;
    stringstream ss;            // XX:YY フォーマットの文字列に整形
    ss << setw(2) << setfill('0') << arrive_hh << ":";
    ss << setw(2) << setfill('0') << arrive_mm;
    return ss.str();
}
            
            
            
        