말랑한 하루

[SW Expert Academy] 9997 미니멀리즘 시계 [C++] 본문

문제풀이/SWexpert Academy

[SW Expert Academy] 9997 미니멀리즘 시계 [C++]

지수는말랑이 2021. 1. 20. 01:22
반응형

[ 핵심풀이 ]

[ 핵심소스 ]

[ C++ ]

#include <iostream>
#pragma warning(disable:4996)

using namespace std;

#define endl "\n"
int main() {
    int tc;
    cin >> tc;
    for (int t = 1; t <= tc; t++) {
        int theta;
        cin >> theta;
        theta *= 2;
        int hour = 0, minute = 0;
        hour = theta / 60;
        minute = theta % 60;
        cout << "#" << t << " " << hour << " " << minute << endl;
    }
}
반응형
Comments