[编程入门]自定义函数处理素数 摘要:注意事项:本题很容易超时,用cmath库里的sqrt函数来求循环终止数可以避免超时以下为c++代码参考代码:#include<iostream>#include<cmath>using namespa…… 题解列表 2022年08月04日 0 点赞 0 评论 447 浏览 评分:9.9
蓝桥杯基础练习VIP-分解质因数 摘要:解题思路:这个思路比较简单注意事项:参考代码:#include<stdio.h>int main(){ int a,b,i,j,n; scanf("%d%d",&a,&b); for(i=a;i<=b…… 题解列表 2022年08月04日 0 点赞 0 评论 503 浏览 评分:9.9
1739: 成绩排序 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<string.h> struct stu{ char name[101]; int age;…… 题解列表 2022年08月04日 0 点赞 0 评论 789 浏览 评分:9.9
字符格式化 摘要:解题思路:。。。。。。。。注意事项:。。。。。。。。。参考代码:n=int(input()) print(format(int(oct(n),8),'o'))…… 题解列表 2022年08月05日 0 点赞 0 评论 593 浏览 评分:9.9
温度转换,两行 摘要:解题思路:。。。。。。。。。。。。。。。。。注意事项:。。。。。。。。。。。。。。。参考代码:f=int(input()) print('{:.2f}'.format(5/9*(f-…… 题解列表 2022年08月05日 0 点赞 0 评论 674 浏览 评分:9.9
凑个数。。。。。 摘要:解题思路:。。。。。。。。。。。。。。。注意事项:。。。。。。。。。。。。。。。参考代码:x = float(input()) if x < 1: y = x elif x >= 1 an…… 题解列表 2022年08月05日 0 点赞 0 评论 517 浏览 评分:9.9
公式法求解 摘要:解题思路:等差公式前n项和:Sn=na1+n(n-1)d/2=(a1+an)n/2.注意事项:参考代码:n=int(input()) a1,an=2,2+3*(n-1) print(int((a1…… 题解列表 2022年08月05日 0 点赞 0 评论 477 浏览 评分:9.9
[编程入门]自定义函数之字符提取 摘要:参考代码:#include<iostream>#include<cstring>using namespace std;int main(){ char in[1000],out[1000]="…… 题解列表 2022年08月05日 0 点赞 0 评论 459 浏览 评分:9.9
[编程入门]自定义函数之字符类型统计 摘要:参考代码:#include<iostream>#include<cstring>using namespace std;int main(){ int a=0,b=0,c=0,d=0,l; …… 题解列表 2022年08月05日 0 点赞 0 评论 579 浏览 评分:9.9
解决猴子吃桃问题 摘要:解题思路:我们可以使用一下试数的办法,将问题给表达出来,例如第三天的时候只剩一个,得出表达式为:第三天剩余:f(3) = 1;第二天剩余:f(2) = 2 * (f(3)+1);第一天剩余:f(1) …… 题解列表 2022年08月05日 0 点赞 0 评论 423 浏览 评分:9.9