1057 分段函数求解,简单易懂(C++) 摘要:解题思路:分段求解,不同情况的分类注意事项:基础知识的应用参考代码:#include<stdio.h>int main(){ int x; float y; scanf("%d",&x); if(x<…… 题解列表 2021年11月03日 0 点赞 0 评论 505 浏览 评分:6.0
C++简单易懂,整除和取余 摘要:解题思路:看代码注释!!!参考代码:#include<bits/stdc++.h> using namespace std; int main(){ long long n; whil…… 题解列表 2021年11月03日 0 点赞 0 评论 745 浏览 评分:0.0
K-进制数 递归算法,10行C++代码,满分解决 摘要:解题思路: 假设K=10,first0(1)表示当N为1,最高位为0时满足条件的数量,first1(1)表示N为1,最高位不为0(即1~K-1)时满足条件的数量: 1、当N=1时,firs…… 题解列表 2021年11月03日 0 点赞 0 评论 409 浏览 评分:9.9
2^k进制数代码详细说明 摘要:解题思路:找到规律即可注意事项:主要要注意分段后可能剩下的不能组成k位的数值取值情况参考代码:import mathk,w=map(int,input().split())a=math.ceil(w/…… 题解列表 2021年11月03日 0 点赞 0 评论 391 浏览 评分:9.9
函数加指针 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include <string.h>#define N 20int main(){ int n, i, lo, m, k; …… 题解列表 2021年11月03日 0 点赞 0 评论 224 浏览 评分:0.0
[编程入门]同因查找---for循环---(Python) 摘要:```python for i in range(10,1001): if i%2==0 and i%3==0 and i%7==0: print(i) ``` 通过…… 题解列表 2021年11月03日 0 点赞 1 评论 878 浏览 评分:9.9
[编程入门]等差数列---for循环---(Python) 摘要:Python 每个数相差了3,所有每次循环对s都加上3用sum累加 ```python n=int(input()) sum=2 s=2 for i in range(1,n): …… 题解列表 2021年11月03日 0 点赞 0 评论 1130 浏览 评分:9.9
水仙花数判断 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,n; for(n=100;n<=999;n++) { a=n…… 题解列表 2021年11月03日 0 点赞 0 评论 219 浏览 评分:0.0
猴子吃桃c语言解法 摘要:解题思路:吃掉的桃子一直是上一次吃掉的桃子的一半,并且吃掉的桃子总数加上最后一个桃子就是桃子总数,根据这个关系,我们可以用吃掉的桃子来不断相加,再加上最后一个桃子,并且从最后一个开始往前加,即可得到答…… 题解列表 2021年11月03日 0 点赞 0 评论 520 浏览 评分:0.0
[编程入门]有规律的数列求和---for循环---(Python) 摘要:Python a等于b,b等于a+b ```python n=int(input()) a,b=1,2 sum1=0 for i in range(n): sum1+=float…… 题解列表 2021年11月03日 0 点赞 0 评论 345 浏览 评分:9.9