题解列表
所有代码中唯一没有用while的
摘要:```python
def hs(q):
p=0
for i in range(10):
if p>=9:
return(0)
……
2846: 统计数字字符个数
摘要:解题思路:注意事项:参考代码:s = input() c = 0 for i in s: if i.isdigit(): c += 1 print(c)……
2848: 基因相关性
摘要:解题思路:注意事项:参考代码:n = float(input())a = input()b = input()c = 0for i,j in zip(a,b): if i == j: ……
不要使用scanf函数,因为scanf不存储空格
摘要:这道题我最开始使用scanf输入,然后提交只能过50%
```c
#include
#include
#include
int cmp(const void *a,const void……
模块化(自定义函数)验证角谷猜想
摘要:解题思路:角谷猜想:任给一个自然数,若为偶数除以2,若为奇数则乘3加1,得到一个新的自然数后按照上面的法则继续演算,若干次后得到的结果必然为1。从这句话可以看出,只有当新的自然数为1时,才会停止循环。……
2849: 石头剪子布
摘要:解题思路:注意事项:参考代码:n = int(input())for i in range(n): a,b = input().split() if (a=='Rock'a……
3行:万花丛中过,片叶不沾身
摘要:```python
a=int(input())
b=int(input())
print(a+b)
```
因为我也曾经站在门外
女孩
我的故事因为你而展开
。。。。。。。
。。。……
2850: 输出亲朋字符串
摘要:解题思路:注意事项:参考代码:s1 = input()s2 = s1[1::1]s2 = s2 + s1[0]s = ""for i in range(len(s1)): s += chr(or……