自定义函数处理素数,仅供参考,还有更简便的方法,欢迎各位大佬借鉴 摘要:参考代码:#includeint sushu(int a){ int i,flage=0; for(i=2;i<a;i++) { if(a%i==0)//判断是否是素数 { flage=1;/…… 题解列表 2021年12月07日 0 点赞 0 评论 416 浏览 评分:9.8
多输入输出练习2 摘要:解题思路:先用宏定义定义一个p,然后定义变量n,计数器k,将k放到while()循环中判断读入半径的个数。注意事项:不要用float 去定义s,a,不然容易出现精度问题,最好用double定义变量。参…… 题解列表 2021年12月07日 0 点赞 0 评论 315 浏览 评分:0.0
单精度输入三位小数输出 摘要:解题思路:注意事项:单精度要用float以及%f;参考代码:#include <stdio.h>int main(){ float a; scanf("%f",&a); printf("%.3f\n"…… 题解列表 2021年12月07日 0 点赞 0 评论 1141 浏览 评分:9.9
输出中间的数 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); printf("%d\n",b); …… 题解列表 2021年12月07日 0 点赞 0 评论 366 浏览 评分:0.0
数学思路来解这一道题的 摘要:解题思路:注意事项:参考代码:import mathwhile True: w, h = map(int, input().split()) if w==0 or h==0: …… 题解列表 2021年12月07日 0 点赞 0 评论 400 浏览 评分:0.0
不同单词个数统-小白题解-C语言代码 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <string.h> char strArr[101]; char temp[101][101]; i…… 题解列表 2021年12月07日 0 点赞 0 评论 466 浏览 评分:0.0
蛇形矩阵 用dp函数来解答 摘要:解题思路:注意事项:参考代码:n=nt(input())dp=[[0]*n for i in rage(n)]dp[0][0]=1for i in range(1,n): dp[i][0]=dp…… 题解列表 2021年12月07日 0 点赞 0 评论 402 浏览 评分:0.0
编写题解 1027: [编程入门]自定义函数处理最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int p(int x,int y); int q(int m,int n); int a,b; s…… 题解列表 2021年12月07日 0 点赞 0 评论 329 浏览 评分:0.0
蓝桥杯2017年第八届真题-正则问题 摘要:解题思路:注意事项: 用<stack>要注意 测试数据的括号()不全是合法的。参考代码:#include<iostream> #include<string> #include<stack> #…… 题解列表 2021年12月07日 0 点赞 1 评论 511 浏览 评分:9.9
简单的C实现,整除的尾数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m, n; while (scanf("%d%d", &m, &n) && n && m) { int…… 题解列表 2021年12月06日 0 点赞 0 评论 320 浏览 评分:0.0