1 条题解

  • 0
    @ 2022-6-12 10:27:56
    #include<bits/stdc++.h>//万能头文件
    using namespace std;
    int main()
    {
        int n;
        cin>>n;//输入这个数
        for (int i=2;i<=n;i++)//用for循环查找最小的因数
          if (n%i==0)//如果i是n的因数
            {
                cout<<n/i;//输出较大的因数
                break;//跳出循环
            } 
        return 0;
    }
    
    
    • 1

    信息

    ID
    76
    时间
    1000ms
    内存
    128MiB
    难度
    2
    标签
    递交数
    57
    已通过
    28
    上传者