시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 2595 1889 1742 76.170%

문제

상근이는 퀴즈쇼의 PD이다. 이 퀴즈쇼의 참가자는 총 8개 문제를 푼다. 참가자는 각 문제를 풀고, 그 문제를 풀었을 때 얻는 점수는 문제를 풀기 시작한 시간부터 경과한 시간과 난이도로 결정한다. 문제를 풀지 못한 경우에는 0점을 받는다. 참가자의 총 점수는 가장 높은 점수 5개의 합이다. 

상근이는 잠시 여자친구와 전화 통화를 하느라 참가자의 점수를 계산하지 않고 있었다. 참가자의 8개 문제 점수가 주어졌을 때, 총 점수를 구하는 프로그램을 작성하시오.

입력

8개 줄에 걸쳐서 각 문제에 대한 참가자의 점수가 주어진다. 점수는 0보다 크거나 같고, 150보다 작거나 같다. 모든 문제에 대한 점수는 서로 다르다. 입력으로 주어지는 순서대로 1번 문제, 2번 문제, ... 8번 문제이다.

출력

첫째 줄에 참가자의 총점을 출력한다. 둘째 줄에는 어떤 문제가 최종 점수에 포함되는지를 공백으로 구분하여 출력한다. 출력은 문제 번호가 증가하는 순서이어야 한다.

예제 입력 1

20
30
50
48
33
66
0
64

예제 출력 1

261
3 4 5 6 8
W3sicHJvYmxlbV9pZCI6IjI4MjIiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM4MTBcdWMyMTggXHVhY2M0XHVjMGIwIiwiZGVzY3JpcHRpb24iOiI8cD5cdWMwYzFcdWFkZmNcdWM3NzRcdWIyOTQgXHVkMDM0XHVjOTg4XHVjMWZjXHVjNzU4IFBEXHVjNzc0XHViMmU0LiBcdWM3NzQgXHVkMDM0XHVjOTg4XHVjMWZjXHVjNzU4IFx1Y2MzOFx1YWMwMFx1Yzc5MFx1YjI5NCBcdWNkMWQgOFx1YWMxYyBcdWJiMzhcdWM4MWNcdWI5N2MgXHVkNDdjXHViMmU0LiBcdWNjMzhcdWFjMDBcdWM3OTBcdWIyOTQgXHVhYzAxIFx1YmIzOFx1YzgxY1x1Yjk3Y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HNpbmdsZSBwb3NpdGl2ZSBpbnRlZ2VyIFggKDAgJmxlOyBYICZsZTsgMTUwKSwgd2hlcmUgdGhlIG51bWJlciBYIGluIHJvdyBpIGRlbm90ZXMgdGhlIG51bWJlciBvZiBwb2ludHMgZWFybmVkIGJ5IHRoZSBjb250ZXN0YW50IG9uIHByb2JsZW0gaS4gQWxsIDggbnVtYmVycyBYIHdpbGwgYmUgZGlzdGluY3QuJm5ic3A7PFwvcD5cclxuIiwib3V0cHV0IjoiPHA+VGhlIGZpcnN0IGxpbmUgb2Ygb3V0cHV0IG11c3QgY29udGFpbiB0aGUgdG90YWwgYW1vdW50IG9mIHBvaW50cyBzY29yZWQgYnkgdGhlIGNvbnRlc3RhbnQuJm5ic3A7PFwvcD5cclxuXHJcbjxwPlRoZSBzZWNvbmQgbGluZSBvZiBvdXRwdXQgbXVzdCBjb250YWluIGluZGljZXMgb2YgdGhlIDUgcHJvYmxlbXMgY291bnRpbmcgdG93YXJkcyB0aGUgdG90YWwgc2NvcmUsIHNvcnRlZCBpbiBhc2NlbmRpbmcgb3JkZXIsIHNlcGFyYXRlZCBieSBzaW5nbGUgc3BhY2VzLiBQcm9ibGVtIGluZGljZXMgYXJlIHBvc2l0aXZlIGludGVnZXJzIGZyb20gMSB0byA4LCBpbmNsdXNpdmUuJm5ic3A7PFwvcD5cclxuIiwiaGludCI6IiIsIm9yaWdpbmFsIjoiMSIsInByb2JsZW1fbGFuZ19jb2RlIjoiXHVjNjAxXHVjNWI0In1d

출처

Contest > Croatian Open Competition in Informatics > COCI 2011/2012 > Contest #2 1번

  • 문제를 번역한 사람: baekjoon
  • 잘못된 데이터를 찾은 사람: devetude