Recent Posts
Notice
No Rules Rules
젓가락 게임 (feat. 백준, 25642번) 본문
728x90
반응형
젓가락 게임
https://www.acmicpc.net/problem/25642
25642번: 젓가락 게임
용태와 유진이가 게임을 플레이했을 때 용태가 이기게 된다면 yt 를, 유진이가 이긴다면 yj 를 출력한다.
www.acmicpc.net
반응형
// woohyeon.kim
// kim519620.tistory.com
#include <iostream>
using namespace std;
int main(){
ios::sync_with_stdio(false), cin.tie(NULL);
register int A, B;
cin >> A >> B;
while(1){
B += A;
if(B >= 5){
cout << "yt";
break;
}
A += B;
if(A >= 5){
cout << "yj";
break;
}
}
return 0;
}
// *&)*@*
단순 연산 문제입니다.
728x90
반응형
'생활 > 코테' 카테고리의 다른 글
사파리월드 (feat. 백준, 2420번) (0) | 2022.09.28 |
---|---|
균형 잡힌 소떡소떡 (feat. 백준, 25641번) (0) | 2022.09.27 |
햄버거 만들기 (feat. 백준, 25628번) (0) | 2022.09.27 |
팰린드롬 소떡소떡 (feat. 백준, 25630번) (0) | 2022.09.27 |
Z (feat. 백준, 1074번) (0) | 2022.09.27 |
Comments