循环链表解决报数--简单解法 摘要:解题思路:// 若要循环链表删除数据直至一个时,则只需一个int pos记录位置// 定义俩个结构指针,一个指当前的,一个指前一个的 // 定义一个i,初始化为0,从head开始++i,每当i==3/…… 题解列表 2023年02月03日 0 点赞 0 评论 353 浏览 评分:9.9
鸡兔同笼问题 摘要:解题思路:数学方法解方程注意事项:参考代码:#include<stdio.h>int main(){ int n,x,y,m; scanf("%d%d",&x,&y); …… 题解列表 2023年02月03日 0 点赞 0 评论 721 浏览 评分:8.0
新手解题:1087丨使用do while循环 摘要:解题思路:注意事项:参考代码:#includeusing namespace std;int main(){ int a, b; cin >> a >> b; do{ …… 题解列表 2023年02月03日 0 点赞 0 评论 505 浏览 评分:9.9
鸡兔同笼(c语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,a,b,c,d; scanf("%d",&n); for(a=0;a<…… 题解列表 2023年02月03日 0 点赞 0 评论 657 浏览 评分:0.0
1258: 连续自然数和 摘要:```cpp #include using namespace std; int main() { long long n,i,j; while(cin>>n) …… 题解列表 2023年02月03日 0 点赞 0 评论 424 浏览 评分:9.9
1256: 诡秘的余数 我无语了。。。 摘要:解题思路:写这题时,我无语了。。。只要把“+”改成“%”就好了。注意事项:参考代码:while True: try: a,b=map(int,input().strip().…… 题解列表 2023年02月03日 0 点赞 0 评论 550 浏览 评分:0.0
1235: 检查金币 摘要:解题思路:题目可以直接用10个for循环搞定,虽然代码不是很简洁,但思路简单。注意事项:参考代码:while True: try: n=int(input()) fo…… 题解列表 2023年02月03日 0 点赞 0 评论 370 浏览 评分:0.0
1227: 日期排序 摘要:解题思路:输入很简单,不用多说,我们把年月日做成一个小列表,塞进大列表里,然后再排序输出就可以了,很简单的一道题。注意事项:参考代码:n=[]while True: try: s=…… 题解列表 2023年02月03日 0 点赞 0 评论 711 浏览 评分:0.0
2797: 最高的分数 摘要:解题思路: 搞不懂这道题的意义在哪里?注意事项:参考代码:n = int(input()) #成绩个数a = list(map(int,input().split())) #把成绩转换为列表p…… 题解列表 2023年02月03日 0 点赞 0 评论 743 浏览 评分:9.6
1229: 最小公倍数 摘要:解题思路:用递归的方法,就可以用简洁的代码解决了。注意事项:参考代码:n1,n2=map(int,input().split())def get(n1,n2): if n1%n2==0: …… 题解列表 2023年02月03日 0 点赞 0 评论 374 浏览 评分:0.0