You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This morning, Raman awakens with a sense of playfulness and opts to partake in jumping endeavors. Commencing from the origin, he is poised to embark on a series of leaps. The sequence adheres to a recurring pattern: a 1-jump followed by a 2-jump and a 3-jump, then looping back to a 1-jump, 2-jump, 3-jump sequence.
In the course of a 1-jump, Raman propels himself from position x to x+1.
For a 2-jump, his advancement stretches from point x to x+2. Executing a 3-jump propels Raman from position x to x+3.
Prior to instigating his sequence of jumps, Raman has a query for you: Will he ultimately land on point "a" after a certain count of jumps?
Constraints
1 ≤ T ≤ 100
0≤ N ≤ 10^18
Your Task -You don't need to read input or print anything. Complete the function RamanJumping() which takes integer as input parameters and returns "YES" without a quotes if Raman can arrive at point a or "NO" without a quotes otherwise.
Simple Input:
1
0
Simple Output:
YES
Simple Input:
2
1
2
Simple Output:
YES
NO
The text was updated successfully, but these errors were encountered:
This morning, Raman awakens with a sense of playfulness and opts to partake in jumping endeavors. Commencing from the origin, he is poised to embark on a series of leaps. The sequence adheres to a recurring pattern: a 1-jump followed by a 2-jump and a 3-jump, then looping back to a 1-jump, 2-jump, 3-jump sequence.
In the course of a 1-jump, Raman propels himself from position x to x+1.
For a 2-jump, his advancement stretches from point x to x+2. Executing a 3-jump propels Raman from position x to x+3.
Prior to instigating his sequence of jumps, Raman has a query for you: Will he ultimately land on point "a" after a certain count of jumps?
Constraints
1 ≤ T ≤ 100
0≤ N ≤ 10^18
Your Task -You don't need to read input or print anything. Complete the function RamanJumping() which takes integer as input parameters and returns "YES" without a quotes if Raman can arrive at point a or "NO" without a quotes otherwise.
Simple Input:
1
0
Simple Output:
YES
Simple Input:
2
1
2
Simple Output:
YES
NO
The text was updated successfully, but these errors were encountered: