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 issue2Thieves
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int ThievesMaxSlapped=5*n;
- int thieves=0;
- double Beers = 0;
- for(int i=0;i<n;i++)
- {
- thieves += int.Parse(Console.ReadLine());
- Beers +=int.Parse(Console.ReadLine());
- }
- int ThievesEscaped = thieves - ThievesMaxSlapped;
- double Sixpack =Math.Floor(Beers / 6);
- double bottles =Beers % 6;
- Console.WriteLine("{0} thieves slapped.\n{1} thieves escaped.\n{2} packs, {3} bottles.", ThievesMaxSlapped, ThievesEscaped,Sixpack,bottles);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment