Advertisement
askarulytarlan

Задача №339. Минимальный делитель

Oct 21st, 2016
545
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cmath>
  4. #include <math.h>
  5.  
  6.  
  7. using namespace std;
  8.  
  9. int a, b;
  10. int main(int argc, const char * argv[]) {
  11. cin >> a;
  12. for(int i = 2; i <= a; i++){
  13. if(a % i == 0){
  14. cout << i;
  15. return 0;
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement