全部评论 2

  • 何意味

    #include <iostream>
    #include <algorithm>
    using namespace std;
    int x,y;
    int lcm(int a,int b)
    {
        return a * b / __gcd(a,b);
    }
    int main()
    {
        scanf("%d%d",&x,&y);
        printf("%d",lcm(x,y));
        return 0;
    }
    

    2026-10-13 来自 江苏

    1
  • #include <bits/stdc++.h>
    using namespace std;
    int n;
    bool flag=true;
    int main(){

    cin>>n;
    if(n==1) cout<<"No";
    else{
        bool flag=true;
        for(int i=2;i<n;i++){
            if(n%i==0){
                flag=false;
                break;
            }
        }
        if(flag==false){
            cout<<"No";
        }else{
            cout<<"Yes";
        }
    }
    
    return 0;
    

    }

    2025-01-19 来自 浙江

    0
暂无数据

提交答案之后,这里将显示提交结果~

首页