using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; namespace yukicore { class Program { private static void Main(string[] args) { Console.ReadLine(); double ntime = 1000.0 / 12.0; int sum = 0; int sucsess = 0; while (true) { var t = Console.ReadLine(); if(string.IsNullOrEmpty(t)) break; var tmp= t.Split(' '); int times = int.Parse(tmp[0]); int counts = tmp[1].Length; var val = counts- (1.0 * times / ntime); if (val <= 0) { val = 0; sucsess+=counts; } else { if (val % 1 != 0) val = Math.Floor(val) + 1; sum += (int)val; sucsess += counts - (int) val; } } Console.WriteLine(sucsess+" "+sum); } } }