acgo题库
  • 首页
  • 题库
  • 学习
  • 天梯
  • 备赛

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
  • 竞赛
  • 讨论
  • 团队
登录
注册
题目详情提交记录(0)
  • ok

    #include<iostream> using namespace std; bool sth(int a1){ if(a1 == 1){ return false; } for(int i = 2 ; i < a1 ; i++){ if(a1 % i == 0){ return false; } } return true; } int main(){ int a; cin >> a; if(sth(a)){ cout << "Yes"; }else{ cout << "No"; } }

    userId_undefined

    白狼王

    1阅读
    0回复
    0点赞
  • 题解

    #include<bits/stdc++.h> using namespace std; int main(){ int a,b=0; cin>>a; if(a<2){ cout<<"No"; return 0; } for(int i=2;i<=sqrt(a);i++){ if(a%i==0){ cout<<"No"; return 0; } } cout<<"Yes"; return 0; }

    userId_undefined

    LS_YZY

    时空双修者倔强青铜题解仙人模拟·模拟练习生出道萌新快乐小狗
    1阅读
    0回复
    0点赞
  • 题解

    也是非常简单

    userId_undefined

    我要AC

    循环·循环打卡人I/O·IO入门者倔强青铜数组·数组操作员分支·分支解题者
    0阅读
    0回复
    0点赞
  • 题解

    #include<bits/stdc++.h> using namespace std; int main() { int n,s=1; cin>>n; if(n==1) { s=0; cout<<"No"; } }

    userId_undefined

    紫薇-五年级lty(必回关)

    出道萌新分支·分支解题者倔强青铜循环·循环打卡人I/O·IO入门者
    0阅读
    0回复
    0点赞
  • AC题解

    userId_undefined

    AC

    0阅读
    0回复
    0点赞

共65条

  • 1
  • 2
  • 3
  • 4
20条/页
跳至页
暂无数据

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

首页