3 条题解

  • 3
    @ 2025-1-17 14:19:05
    #include<iostream>
    using namespace std;
    int main(){
    	int n;
    	cin >> n;
    	for (int i = 1; i <= n; i++){
    		if (n % i == 0 and i != 1){
    			cout << i;
    			break;
    		}
    	}
    	return 0;
    }
    
    
    • 2
      @ 2024-1-26 21:11:08

      #include <iostream> using namespace std; int main() { int n; cin >> n; for(int i = 2 ;i <= n;i++){ if(n%i==0){ cout<<i; break; } } return 0; }

      • 1
        @ 2024-1-26 21:10:07

        #include <iostream> using namespace std; int main() { int n; cin >> n; for(int i = 2 ;i <= n;i++){ if(n%i==0){ cout<<i; break; } } return 0; }

        • 1

        信息

        ID
        47
        时间
        1000ms
        内存
        256MiB
        难度
        5
        标签
        递交数
        297
        已通过
        110
        上传者