Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 |
Tags
- 오퍼레이팅시스템
- c++
- coding
- DP
- 코딩
- 개발
- 스택
- bfs
- 알고리즘
- cs
- Operating System
- 컴퓨터공학과
- 백준
- 컴공과
- vector
- 문제풀이
- 브루트포스
- 북리뷰
- 그래프
- 오에스
- 구현
- 정석학술정보관
- 자료구조
- 코테
- Stack
- 정석
- OS
- Computer science
- 너비우선탐색
- 컴공
Archives
- Today
- Total
Little Jay
[C++] 백준 3052번 나머지 본문
#include <iostream>
using namespace std;
int main() {
const int DIVISOR = 42;
int arr[42]{ 0 };
int count = 0;
int a;
for (int i = 0; i < 10; i++) {
cin >> a;
arr[a % 42]++;
}
for (int i : arr) {
if (i > 0) {
count++;
}
}
cout << count << "\n";
return 0;
}'알고리즘 > BOJ' 카테고리의 다른 글
| [C++] 백준 2476번 주사위 (0) | 2021.03.06 |
|---|---|
| [C++] 백준 1284번 집 주소 (0) | 2021.03.06 |
| [C++] 백준 14656번 조교는 새디스트야!! (0) | 2021.03.06 |
| [C++] 백준 2566번 최댓값 (0) | 2021.03.06 |
| [C++] 백준 2511번 카드놀이 (0) | 2021.03.06 |
Comments