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 help
- {
- class Program
- {
- static void Main(string[] args)
- {
- int X_loze_area = int.Parse(Console.ReadLine());
- double Y_grapes_for_one_sq = double.Parse(Console.ReadLine());
- int Z_needed_litres = int.Parse(Console.ReadLine());
- int number_of_workers = int.Parse(Console.ReadLine());
- //judge sumbit link: https://judge.softuni.bg/Contests/Practice/Index/507#3
- double kg_grapes = (X_loze_area * Y_grapes_for_one_sq) * 0.4;
- double vino = kg_grapes / 2.5;
- if (vino >= Z_needed_litres)
- {
- Console.WriteLine("Good harvest this year! Total wine: {0} liters.", Math.Floor(vino));
- Console.WriteLine("{0} liters left -> {1} liters per person.", Math.Ceiling(vino - Z_needed_litres), Math.Ceiling((vino -Z_needed_litres) / number_of_workers));
- }
- else
- {
- Console.WriteLine("It will be a tough winter! More {0} liters wine needed.", Math.Floor(Z_needed_litres - vino));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement