Ninety-nine

면접 대비

시간 제한1초메모리 제한1024 MB

요약
1 또는 2로 시작해 매 차례 1이나 2를 더해 99를 먼저 말하는 사람이 이기는 게임에서 이기는 수를 찾는다.
난이도

보통10점 중 5점

유형
게임 이론, 동적 계획법, 구현
정답자
아직 제출이 없습니다

문제

You and your friend are playing a game which you call Ninety-nine. You start, by saying either the number 1 or 2. You then take turns, starting with your friend, increasing this number by either 1 or 2 in each step. The first player who gets to say the number 99 wins!

Write a program which plays this game for you and wins.

예제

이 문제는 공개된 예제가 없습니다.