Chef Plays Ludo

Tags : codechef, math, cpp, easy

Chef is playing Ludo. According to the rules of Ludo, a player can enter a new token into the play only when he rolls a 6 on the die.

In the current turn, Chef rolled the number X on the die. Determine if Chef can enter a new token into the play in the current turn or not.

Input Format:

Output Format:

Examples #

Example 1:

Input :
3
1
6
3

Output :
NO
YES
NO

Explanation :
Test Case 1: Since Chef did not roll a 6, he can not enter a new token in the play.

Test Case 2: Since Chef rolled a 6, he can enter a new token in the play.

Constraints #

Solutions #

#include <iostream>
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
int MOD = 1e9+7;

string solution(int x) {
    return x==6 ? "YES" : "NO";
}

int main() {
	// your code goes here
	int T; cin >> T;
	int x;
	while(T--) {
	    cin >> x;
	    auto res = solution(x);
	    std::cout << res << std::endl;
	}
	return 0;
}