문제 링크 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV13zo1KAAACFAYh
문제의 저작권은 SW Expert Academy에 있습니다.
#include <iostream> using namespace std; int main(void) { for(int t_case=0; t_case<10; t_case++) { int score[101] = {0}, temp, max=0, max_students=0; cin >> temp; for(int i=0; i<1000; i++) { cin >> temp; score[temp]++; } for(int i=0; i<101; i++) { if(score[i] >= max_students) { max = i; max_students = score[i]; } } cout << "#" << t_case+1 << " " << max << "\n"; } return 0; } | cs |
'C & C++ > SW Expert Academy' 카테고리의 다른 글
SWEA 1983 - 조교의 성적 매기기 (2) | 2018.04.28 |
---|---|
SWEA 1979 - 어디에 단어가 들어갈 수 있을까 (0) | 2018.04.28 |
SWEA 1768 - [SW Test 샘플문제] 숫자야구게임 (0) | 2018.04.28 |
SWEA 3499 - 퍼펙트 셔플 (0) | 2018.04.28 |
SWEA 1222 - [S/W 문제해결 기본] 6일차 계산기1 (0) | 2018.04.28 |