Advertisement
ikopchev

Poke Mon

May 28th, 2024
655
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | Help | 0 0
  1. int powerN= int.Parse(Console.ReadLine());
  2. int targetsM = int.Parse(Console.ReadLine());
  3. int exhaustionY = int.Parse(Console.ReadLine());
  4. int statusS = powerN;
  5. int pokesP = 0;
  6. while(targetsM<=statusS)
  7. {
  8.     statusS-= targetsM;
  9.     pokesP++;
  10.     if ((powerN/2) % 1 == 0 && statusS%1==0)
  11.     {
  12.         if ( powerN/2 == statusS )
  13.     {
  14.           statusS/=exhaustionY;
  15.     }
  16.  
  17.     }
  18.        
  19.        
  20. }
  21. Console.WriteLine(statusS);
  22. Console.WriteLine(pokesP);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement