Grab N Games

Fun programming _ grab n game

Topic description

This is a Chinese folk game. Two people report numbers in turn starting from 1. Each person can report one number or two consecutive numbers at a time. Whoever reports to n first (n<1000000001) is the winner. Now it is up to you to decide whether the first hand wins or the second hand wins.

enter

There are multiple sets of data, each row has only one n;

output

If the first mover wins, output no, otherwise output yes;

sample input

10

Sample output

no

Code:

#include<stdio.h>
int main()
{
    int n;
    while(scanf("%d",&n)==1)
        if(n%3==0)
        printf("%s\n","yes");
    else
        printf("%s\n","no");
    return 0;
}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324778678&siteId=291194637