Open JMukta25 opened 2 years ago
HEY!!! This is Aditi Sharma(SY-C) MKSSS's CCOEW Computer Engineering
I want to work on this issue Please assign this to me.
Nikita Miraje CCOEW E&TC I would like to work on this issue.....can you plz assign this issue to me????
Hi! @JMukta25 Can you please assign me this task. I am Akshat Tiwari of BIT Raipur from Computer Science Engineering Branch.
Hi! @JMukta25 Can you please assign me this task. I am Akshat Tiwari of BIT Raipur from Computer Science Engineering Branch.
How many issues have been assigned to you yet?
Only 1
Only 1
I have assigned this issue.
A jail has a number of prisoners and a number of treats to pass out to them. Their jailer decides the fairest way to divide the treats is to seat the prisoners around a circular table in sequentially numbered chairs. A chair number will be drawn from a hat. Beginning with the prisoner in that chair, one candy will be handed to each prisoner sequentially around the table until all have been distributed.
The jailer is playing a little joke, though. The last piece of candy looks like all the others, but it tastes awful. Determine the chair number occupied by the prisoner who will receive that candy. n=4 m=6 s=2 There are 4 prisoners, 6 pieces of candy and distribution starts at chair 2 . The prisoners arrange themselves in seats numbered 1 to 4 . Prisoners receive candy at positions 2,3,4,1,2,3 . The prisoner to be warned sits in chair number . Input Format int n: the number of prisoners int m: the number of sweets int s: the chair number to begin passing out sweets from Input 1 2 5 2 1 5 2 2 Output 2 3 Input 2 2 7 19 2 Output 6 3 3 7 3