[编程入门]自定义函数之数字分离 摘要:解题思路:将该数字各个位数分别拆开,再放入注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,d,e,f,g; scanf("%d",&a); b=a%1…… 题解列表 2021年10月10日 0 点赞 0 评论 334 浏览 评分:7.0
绝对值排序 用C语言基础的方法 摘要:通过一开始的输入控制为有数据的范围内,再进行循环得到答案;参考代码:#include<stdio.h> #include<math.h> #include<stdlib.h> int main(…… 题解列表 2021年10月17日 0 点赞 0 评论 232 浏览 评分:7.0
1173: 计算球体积-题解(python) 摘要:解题思路:注意事项:参考代码:import mathwhile True: r = float(input()) p = math.pi v = (4/3)*p*(r**3) …… 题解列表 2021年10月23日 0 点赞 1 评论 1066 浏览 评分:7.0
分段函数求值 摘要:解题思路:无注意事项:这么简单都不会参考代码:x=int(input())if x<1: y=xelif 1<=x<10: y=2*x-1else: y=3*x-11print(y)…… 题解列表 2021年10月28日 0 点赞 0 评论 795 浏览 评分:7.0
1183: 人见人爱A+B 摘要:解题思路:注意事项:参考代码:n=int(input())for i in range(n): a,b,c,d,e,f=map(int,input().split()) s=(c+f)%6…… 题解列表 2021年11月01日 0 点赞 0 评论 598 浏览 评分:7.0
【c语言求解】【编程入门】自定义函数求一元二次方程 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ double over(double a,double b,double c);…… 题解列表 2021年11月07日 0 点赞 0 评论 678 浏览 评分:7.0
1095:The 3n+1 problem(要比较输入的n与m的大小) 摘要:#include<stdio.h> #include<string.h> int main() { int p,n,m,k,sum,a[1000],j,max; k=0; …… 题解列表 2021年11月17日 0 点赞 0 评论 311 浏览 评分:7.0
求阶乘需要注意几个点--递归 摘要:解题思路:我用的递归注意事项:递归的结束条件不能仅仅是(x==1)return 1;而应该是(x==1||x==0)return 1;或者直接是(x==0)return 1;因为0的阶乘是1;如果只是…… 题解列表 2021年12月05日 0 点赞 0 评论 495 浏览 评分:7.0
实数的打印 摘要:解题思路:注意事项:参考代码:a=float(input())for i in range(1,4): for j in range(i): print(f"{a:6.2f}",e…… 题解列表 2022年01月11日 0 点赞 0 评论 572 浏览 评分:7.0
优质题解 报数问题(c++) 摘要:解题思路 看到题的第一刻就看出了这是一个低配版的约瑟夫环问题,那该怎么做呢,在看到题目的时候他告诉了你的要求分别是,人数,报数人,报数号,在报数号等于3时我们要将报数人淘汰,然后从1重新报数,当…… 题解列表 2022年01月11日 0 点赞 0 评论 1366 浏览 评分:7.0