Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class GrandTheftExamo
- {
- static void Main()
- {
- byte numerOfAttempts = byte.Parse(Console.ReadLine());
- long thievesSlaped = 0;
- long thievesEscaped = 0;
- long totalBeers = 0;
- for (int i = 0; i < numerOfAttempts; i++)
- {
- long thievesAttemtEscape = long.Parse(Console.ReadLine());
- long amountOfBeer = long.Parse(Console.ReadLine());
- if (thievesAttemtEscape > 5)
- {
- thievesEscaped += thievesAttemtEscape - 5;
- thievesSlaped += 5;
- totalBeers += amountOfBeer;
- }
- else
- {
- thievesSlaped += thievesAttemtEscape;
- totalBeers += amountOfBeer;
- }
- }
- Console.WriteLine("{0} thieves slapped.", thievesSlaped);
- Console.WriteLine("{0} thieves escaped.", thievesEscaped);
- Console.WriteLine("{0} packs, {1} bottles.", totalBeers / 6, totalBeers % 6);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement