Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class PetarsGame
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- long vonSlapped = 0; //___________________
- long vonEscape = 0;
- long beer = 0;
- long resultSlapped = 0;
- long count = 0;
- for (int i = 1; i <= n; i++)
- {
- count++;
- long amountOfThieves = long.Parse(Console.ReadLine());
- long beer2 = long.Parse(Console.ReadLine());
- if (amountOfThieves > 5)
- {
- vonSlapped += 5; //___________________
- resultSlapped = amountOfThieves - 5; //___________________
- vonEscape += resultSlapped;
- }
- else
- {
- vonSlapped += amountOfThieves;
- vonEscape = 0;
- }
- if (beer2 < 999999999999999999)
- {
- beer += beer2;
- }
- }
- //double resultSlappedd = resultSlapped * count;
- Console.WriteLine("{0} thieves slapped.", vonSlapped); //___________________
- Console.WriteLine("{0} thieves escaped.", vonEscape);
- Console.WriteLine("{0} packs, {1} bottles.", beer / 6, beer % 6);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement