解题思路:
注意事项:
参考代码:
#include <cstdio> #include <cstring> #include <string> #include <cmath> #include <cctype> #include <functional> #include <iostream> #include <algorithm> using namespace std; int main() { int n; scanf("%d", &n); for(int i = 2; i <= floor(sqrt(n)+0.5); ++i) { if(n%2 == 0) { printf("0\n"); return 0; } } printf("1\n"); return 0; }
0.0分
2 人评分
拆分位数 (C++代码)用char简单粗暴,嗯浏览:1087 |
你的开发任务 (C++代码)写到一半,等有心情回来补全浏览:887 |
C语言训练-排序问题<2> (C++代码)(sort函数)浏览:1578 |
C二级辅导-同因查找 (C语言代码)浏览:562 |
点我有惊喜!你懂得!浏览:1330 |
破解简单密码 (C语言代码)浏览:1766 |
C语言程序设计教程(第三版)课后习题11.8 (C语言代码)浏览:612 |
回文串 (C语言代码)浏览:2857 |
C语言程序设计教程(第三版)课后习题7.3 (C语言代码)浏览:1195 |
C语言程序设计教程(第三版)课后习题10.1 (C语言代码)浏览:563 |