백준 2577번 숫자의 개수
https://www.acmicpc.net/problem/2577 아이디어:1. 문자열로 변환 후 각 문자에 접근해서 count 변수를 추가하고 출력2. switch case문 사용 // 2577#include #include using namespace std;int main() { ios::sync_with_stdio(false); cin.tie(NULL); int A, B, C, mul; string mul_result; int count_0 = 0, count_1 = 0, count_2 = 0, count_3 = 0, count_4 = 0; int count_5 = 0, count_6 = 0, count_7 = 0, count_8 = 0, count_9 = 0; cin >> A >> B >> C;..
백준 2475번 검증수
https://www.acmicpc.net/problem/2475 아이디어:함수 작성 // 2475#include using namespace std;int calc(int a, int b, int c, int d, int e) { return ((a * a) + (b * b) + (c * c) + (d * d) + (e * e)) % 10;}int main() { ios::sync_with_stdio(false); cin.tie(NULL); int a, b, c, d, e, f; cin >> a >> b >> c >> d >> e; f = calc(a, b, c, d, e); cout