Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can someone help me with python code to this problem #458

Open
Bangre7808 opened this issue Mar 10, 2024 · 0 comments
Open

Can someone help me with python code to this problem #458

Bangre7808 opened this issue Mar 10, 2024 · 0 comments

Comments

@Bangre7808
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant