题解列表
C++ STL Vector + 二分查找
摘要:解题思路: lower_bound:查找第一个大于或等于某个元素的位置。 upper_bound:查找第一个大于某个元素的位置。代码:#include<bits/stdc++.h>
us……
自定义函数处理最大公约数与最小公倍数
摘要:解题思路:注意事项:参考代码: def yue(a,b): min =(a<b and a or b) i=min while i>0: if a%i==0 and……
计算数字个数---详细讲解---(Python)
摘要:Python
通过遍历字符串判断字符是否为数字
```python
n=input()
s=0
for i in n:
if i.isdigit():
s=s+1……
结构体解题(c语言代码)
摘要:#include <stdio.h>
#include <string.h>
struct stu
{
char s[20];
int f;
};
int main()
{
i……
关于 str(input().split()) input().split()的区别
摘要:解题思路:注意事项:参考代码:s=str(input().split())s2=input().split()print(type(s))print(type(s2))j=1for i in s: ……
编写题解 1132: 最大数问题 数组 通俗易懂
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a[100],i,j=0,max; for(i=0……
筛选素数 思路清晰 图片加代码的形式 观看体验极佳
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); for(int i=2; i<=n; i++) { int fl……