Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace PokeMon
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int m = int.Parse(Console.ReadLine());
- int y = int.Parse(Console.ReadLine());
- double x = n / 2;
- int counter = 0;
- while (n >= m)
- {
- n -= m;
- counter++;
- if (n == x && y != 0)
- {
- n /= y;
- }
- }
- Console.WriteLine(n);
- Console.WriteLine(counter);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement