Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int powerN= int.Parse(Console.ReadLine());
- int targetsM = int.Parse(Console.ReadLine());
- int exhaustionY = int.Parse(Console.ReadLine());
- int statusS = powerN;
- int pokesP = 0;
- while(targetsM<=statusS)
- {
- statusS-= targetsM;
- pokesP++;
- if ((powerN/2) % 1 == 0 && statusS%1==0)
- {
- if ( powerN/2 == statusS )
- {
- statusS/=exhaustionY;
- }
- }
- }
- Console.WriteLine(statusS);
- Console.WriteLine(pokesP);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement