Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13951

Please help me write the code for this problem [closed]

$
0
0

[enter image description here](https://i.stack.imgur.com/vGtz6.jpg)Please help me solve the problem.Please send the code in python if possible.

Problem is as follows:

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?

Constraints1 ≤ T ≤ 1000≤ 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:10Simple Output:YES

Simple Input:212Simple Output:YESNO


Viewing all articles
Browse latest Browse all 13951

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>