| //https://www.acmicpc.net/problem/1476 #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| int E, S, M; | |
| cin >> E >> S >> M; | |
| E%=15; | |
| S%=28; | |
| M%=19; | |
| for(int i=1; ;i++) | |
| if((i%15)==E && (i%28)==S && (i%19)==M) | |
| { | |
| cout << i ; | |
| break; | |
| } | |
| } |
'알고리즘 문제 풀이 > 1DP_과제(~180615)' 카테고리의 다른 글
| 171128_1495_기타리스트 (큐 이용) (0) | 2017.11.28 |
|---|---|
| 171127_14891_톱니바퀴 (0) | 2017.11.27 |
| 171127_4344_평균은 넘겠지 (0) | 2017.11.27 |
| 171127_2743_단어 길이 재기 (0) | 2017.11.27 |
| 171126_1032_명령 프롬프트 (0) | 2017.11.26 |