Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _06.Control
- {
- class Program
- {
- static void Main(string[] args)
- {
- int N = int.Parse(Console.ReadLine());
- int M = int.Parse(Console.ReadLine());
- int control = int.Parse(Console.ReadLine());
- int sum = 0;
- int counter = 0;
- for (int i = 1; i <=N ; i++)
- {
- for (int j = M; j >= 1; j--)
- {
- counter++;
- sum = sum + N * 2 + M * 3;
- if ( sum >= control)
- {
- Console.WriteLine("{0} moves", counter);
- Console.WriteLine("Score: {0} >= {1}", sum, control);
- return;
- }
- else if (sum < control)
- {
- Console.WriteLine("{0} moves", counter);
- return;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement