3行:万花丛中过,片叶不沾身 解题思路:摘一颗苹果,来送给你解渴注意事项:我也不知为何,伤口还没愈合参考代码:a=int(input())b=int(input())print(a*b) 题解列表 2024年08月01日 0 点赞 0 评论 1013 浏览 评分:0.0
使用qsort函数排序 这道题坑挺多首先,假如数组元素只有一个,那个只需要把那个元素输出,然后再输出一个-1即可,其次,这道题需要连续输入。```c#include#includeintcmp(constvoid*a,constvoid*b){return*(int*)a-*(int*)b;}//qsort排序的固定写法in 题解列表 2024年08月01日 0 点赞 0 评论 556 浏览 评分:0.0
方便的find查找 摘要:#include<bits/stdc++.h> using namespace std; int main() { int n,cnt=0; cin>>n; for…… 题解列表 2024年08月01日 0 点赞 0 评论 441 浏览 评分:0.0
所有代码中唯一没有用while的 摘要:```python def hs(q): p=0 for i in range(10): if p>=9: return(0) …… 题解列表 2024年08月01日 0 点赞 0 评论 1018 浏览 评分:0.0
2846: 统计数字字符个数 摘要:解题思路:注意事项:参考代码:s = input() c = 0 for i in s: if i.isdigit(): c += 1 print(c)…… 题解列表 2024年08月01日 1 点赞 0 评论 1450 浏览 评分:0.0
2848: 基因相关性 摘要:解题思路:注意事项:参考代码:n = float(input())a = input()b = input()c = 0for i,j in zip(a,b): if i == j: …… 题解列表 2024年08月01日 0 点赞 0 评论 853 浏览 评分:0.0
不要使用scanf函数,因为scanf不存储空格 这道题我最开始使用scanf输入,然后提交只能过50%```c#include#include#includeintcmp(constvoid*a,constvoid*b){return*(char*)a-*(char*)b;}intmain(){chara[200];while(scanf("%s" 题解列表 2024年08月01日 0 点赞 0 评论 823 浏览 评分:0.0
模块化(自定义函数)验证角谷猜想 解题思路:角谷猜想:任给一个自然数,若为偶数除以2,若为奇数则乘3加1,得到一个新的自然数后按照上面的法则继续演算,若干次后得到的结果必然为1。从这句话可以看出,只有当新的自然数为1时,才会停止循环。而在循环中,需要判断这个自然数是奇数还是偶数。 题解列表 2024年08月01日 0 点赞 0 评论 591 浏览 评分:0.0
练练浮点数二分吧 摘要:#include<bits/stdc++.h>//浮点数二分 using namespace std; int main() { double x; cin>>x; double l…… 题解列表 2024年08月01日 0 点赞 0 评论 718 浏览 评分:0.0
2849: 石头剪子布 摘要:解题思路:注意事项:参考代码:n = int(input())for i in range(n): a,b = input().split() if (a=='Rock'a…… 题解列表 2024年08月01日 2 点赞 0 评论 1106 浏览 评分:0.0