ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • boj 11653
    카테고리 없음 2021. 8. 15. 03:19
    #include <bits/stdc++.h>
    using namespace std;
    
    int main(void) {
    	int N, i = 2;
    	cin >> N;
    
    	while (N!=1) {
    		if (N % i == 0) {
    			while (N % i==0) {
    				cout << i << "\n";
    				N /= i;
    			}
    		}
    		i = i + 1;
    	}
    }

    댓글

Designed by Tistory.