시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 534 269 223 53.222%

문제

동혁이는 NBA 농구 경기를 즐겨 본다. 동혁이는 골이 들어갈 때 마다 골이 들어간 시간과 팀을 적는 이상한 취미를 가지고 있다.

농구 경기는 정확히 48분동안 진행된다. 각 팀이 몇 분동안 이기고 있었는지 출력하는 프로그램을 작성하시오.

입력

첫째 줄에 골이 들어간 횟수 N(1<=N<=100)이 주어진다. 둘째 줄부터 N개의 줄에 득점 정보가 주어진다. 득점 정보는 득점한 팀의 번호와 득점한 시간으로 이루어져 있다. 팀 번호는 1 또는 2이다. 득점한 시간은 MM:SS(분:초) 형식이며, 분과 초가 한자리 일 경우 첫째자리가 0이다. 분은 0보다 크거나 같고, 47보다 작거나 같으며, 초는 0보다 크거나 같고, 59보다 작거나 같다. 득점 시간이 겹치는 경우는 없다.

출력

첫째 줄에 1번 팀이 이기고 있던 시간, 둘째 줄에 2번 팀이 이기고 있던 시간을 출력한다. 시간은 입력과 같은 형식(MM:SS)으로 출력한다.

예제 입력 1

3
1 01:10
2 21:10
2 31:30

예제 출력 1

20:00
16:30
W3sicHJvYmxlbV9pZCI6IjI4NTIiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJOQkEgXHViMThkXHVhZDZjIiwiZGVzY3JpcHRpb24iOiI8cD5cdWIzZDlcdWQ2MDFcdWM3NzRcdWIyOTQgTkJBIFx1YjE4ZFx1YWQ2YyBcdWFjYmRcdWFlMzBcdWI5N2MgXHVjOTkwXHVhY2E4IFx1YmNmOFx1YjJlNC4gXHViM2Q5XHVkNjAxXHVjNzc0XHViMjk0IFx1YWNlOFx1Yzc3NCBcdWI0ZTRcdWM1YjRcdWFjMDggXHViNTRjIFx1YjljOFx1YjJlNCBcdWFjZThcdWM3NzQgXHViNGU0XHVjNWI0XHVhYzA0IFx1YzJkY1x1YWMwNFx1YWNmYyBcdWQzMDBcdWM3NDQgXHVjODAxXHViMjk0IFx1Yzc3NFx1YzB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GEgdGltZXN0YW1wIGluIGZvcm1hdCBNTTpTUyAobWludXRlczpzZWNvbmRzKSwgdGhlIHRpbWUgd2hlbiBhIHRlYW0gc2NvcmVkLiBNaW51dGVzIGFuZCBzZWNvbmRzIGFyZSB6ZXJvIHBhZGRlZCBhbmQgZnJvbSByYW5nZXMgWzAwLCA0N10gYW5kIFswMCwgNTldIChpbmNsdXNpdmUpLiBUaGUgZ2l2ZW4gdGltZXN0YW1wcyBhcmUgdW5pcXVlLiZuYnNwOzxcL3A+XHJcbiIsIm91dHB1dCI6IjxwPlRoZSBmaXJzdCBsaW5lIG9mIG91dHB1dCBtdXN0IGNvbnRhaW4gdGhlIGR1cmF0aW9uIHRoYXQgdGhlIGZpcnN0IHRlYW0gd2FzIGluIHRoZSBsZWFkLiZuYnNwOzxcL3A+XHJcblxyXG48cD5UaGUgc2Vjb25kIGxpbmUgb2Ygb3V0cHV0IG11c3QgY29udGFpbiB0aGUgZHVyYXRpb24gdGhhdCB0aGUgc2Vjb25kIHRlYW0gd2FzIGluIHRoZSBsZWFkLiZuYnNwOzxcL3A+XHJcblxyXG48cD5BbGwgZHVyYXRpb25zIHNob3VsZCBiZSBpbiBNTTpTUyBmb3JtYXQsIHdpdGggbGVhZGluZyB6ZXJvcy4mbmJzcDs8XC9wPlxyXG4iLCJoaW50IjoiIiwib3JpZ2luYWwiOiIxIiwicHJvYmxlbV9sYW5nX2NvZGUiOiJcdWM2MDFcdWM1YjQifV0=

출처

Contest > Croatian Open Competition in Informatics > COCI 2010/2011 > Contest #5 2번

  • 문제를 번역한 사람: baekjoon
  • 문제의 오타를 찾은 사람: emiling