Notice
Recent Posts
Recent Comments
Link
목록날짜 계산 (1)
Be a developer
15 * 28 * 18 = 7980이기 때문에 시간 제한안에 모든 경우의 수를 다 해볼 수 있다. 각각 최대치를 넘어갈 때 1로 초기화시켜주고, 주어진 날과 일치할 때 멈춘 후 year를 출력한다. 12345678910111213141516171819202122#include using namespace std; int main(int argc, char* argv[]) { int e, s, m, E, S, M; long long year; e = s = m = year = 1; cin >> E >> S >> M; while(true){ if (e == E && s == S && m == M) { cout
알고리즘
2019. 3. 26. 15:17