코드포스(CodeForce)
Codeforces Round #465 (Div. 2) - A. Fafa and his Company
cepiloth
2018. 8. 17. 17:32
반응형
1. 문제
2. 알고리즘
키워드 - 구현
3. 코드
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #include <iostream> #include <algorithm> // min #include <math.h> using namespace std; int main() { int n; cin >> n; int sol = 0; for (int i = 1; i < n; i++) { // 방법의 수 if (n % i == 0) sol++; } cout << sol << endl; return 0; } | cs |
반응형