Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- int originPokePower = int.Parse(Console.ReadLine());
- int pokePower = originPokePower;
- int distance = int.Parse(Console.ReadLine());
- int exhaustionFactor = int.Parse(Console.ReadLine());
- int targetCounter = 0;
- while (pokePower >= distance)
- {
- pokePower -= distance;
- if (pokePower == originPokePower / 2
- && exhaustionFactor > 0)
- {
- pokePower /= exhaustionFactor;
- }
- targetCounter++;
- }
- Console.WriteLine(pokePower);
- Console.WriteLine(targetCounter);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement