using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoderTest { class Program { static void Main(string[] args) { string n = Console.ReadLine(); int kukan = int.Parse(n); int typecnt = 0; int failtype = 0; for (int i = 0; i < kukan; i++) { string input = Console.ReadLine(); string[] inputary = input.Split(' '); int time = int.Parse(inputary[0]); int strlen = inputary[1].Length; int cantype = (12 * time) / 1000; if (strlen - cantype >= 1) { failtype = failtype + (strlen - cantype); int fail = strlen - cantype; typecnt = typecnt + strlen-fail; } else { typecnt = typecnt + strlen; } } string ans = typecnt.ToString() + " " + failtype.ToString(); Console.WriteLine(ans); } } }