成绩归类简单易懂 数组+循环(C语言版) 摘要:解题思路:这题的难点在于如何在0或者负数的时候停止输入数组。我这个方法算是钻了一个测试样例比较少的空子,来实现这个循环,当数组出现0或者负数的时候进行break脱离循环的操作以终止输入。注意事项:参考…… 题解列表 2021年11月14日 0 点赞 0 评论 437 浏览 评分:0.0
两个函数都用递归的操作 摘要:解题思路:注意事项:参考代码:#include<iomanip>using namespace std;double fact(double n){ if(n==1) return 1; return…… 题解列表 2021年11月14日 0 点赞 0 评论 365 浏览 评分:0.0
[编程入门]自定义函数处理素数--------(Python详解) 摘要:素数只能被1或本身整除的数才是素数 ```python def fun(n): for i in range(2,n+1): if n%i==0: …… 题解列表 2021年11月14日 0 点赞 0 评论 692 浏览 评分:0.0
[编程入门]宏定义的练习(C++)(简单易懂) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#define s(a,b) a%bint main(){ int a,b,t; cin>>a…… 题解列表 2021年11月14日 0 点赞 0 评论 601 浏览 评分:9.9
[编程入门]报数问题-------(Python详解)------13行解决 摘要:注意: -----他是一个圈每次到3时退出这个圈!!! 答案如下: ```python n=int(input()) t=[i for i in range(1,n+1)] a=1 …… 题解列表 2021年11月14日 0 点赞 0 评论 477 浏览 评分:0.0
非常精简,一个数组,两个循环(C语言)。 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b=0,n=9,x[9]={0}; while(n--&&scanf("%d",&a…… 题解列表 2021年11月14日 0 点赞 0 评论 671 浏览 评分:0.0
母牛故事题解 摘要:解题思路:奶牛数量就是前一年的奶牛数+要生的奶牛数要生的奶牛数就是三年前的奶牛数注意事项:参考代码:alist=[1,2,3,4]for i in range(4, 60): alist.app…… 题解列表 2021年11月14日 0 点赞 0 评论 795 浏览 评分:9.1
[竞赛入门]简单的a+b 摘要:#include<stdio.h> int main() { int a,b; while(scanf("%d %d",&a,&b)==2) printf("%d\n",a+b); …… 题解列表 2021年11月14日 0 点赞 0 评论 340 浏览 评分:0.0
统计字符..... 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main(){ int a=0,b=0,c=0,d=0; char ch; ch=getchar();…… 题解列表 2021年11月14日 0 点赞 0 评论 289 浏览 评分:2.0
P1000......21888545 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main(){ int a,b,sum; scanf("%d%d",&a,&b); sum=a+b; …… 题解列表 2021年11月14日 0 点赞 0 评论 318 浏览 评分:2.0