Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Renovation
- {
- class Program
- {
- static void Main(string[] args)
- {
- int height = int.Parse(Console.ReadLine());
- int width = int.Parse(Console.ReadLine());
- int windows = int.Parse(Console.ReadLine());
- int area =(int) Math.Ceiling(height * width * (1 - windows / 100.0)*4);
- while(area>0)
- {
- string command = Console.ReadLine();
- if(command=="Tired!")
- {
- Console.WriteLine($"{area} quadratic m left.");
- return;
- }
- int paint = int.Parse(command);
- area -= paint;
- }
- if (area<0)
- {
- Console.WriteLine($"All walls are painted and you have {Math.Abs(area)} l paint left!");
- }
- else
- {
- Console.WriteLine("All walls are painted! Great job, Pesho!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement