用三目运算符简化if-else 摘要:```c #include int main(){ int num; int a,b,c; scanf("%d",&num); a=num/100%10; b=num/10%…… 题解列表 2022年10月03日 0 点赞 0 评论 279 浏览 评分:0.0
程序员的表白 摘要:解题思路:无注意事项:无参考代码: #include<stdio.h>int main(){ int i,j,a,m; while(scanf("%d",&a)==1) { …… 题解列表 2022年10月03日 0 点赞 0 评论 393 浏览 评分:0.0
先左到右遍历,再右到左,最后输出 摘要:```c #include #include int main(){ char s[110]; scanf("%s",s); int len=strlen(s); for(i…… 题解列表 2022年10月03日 0 点赞 0 评论 322 浏览 评分:0.0
1054: 二级C语言-计算素数和,通俗易懂 摘要:写题思路:本体难度不高,也没啥思路,按部就班就行 具体标志也写在下方代码中。 #include int main() { int m,n,x; …… 题解列表 2022年10月03日 0 点赞 0 评论 340 浏览 评分:0.0
1020-猴子吃桃的问题 数据结构:数组 语言:C++ 摘要:解题思路:注意事项:参考代码:/*a[]数组存储每一天桃子的剩余量。a[i]表示第i天桃子的剩余量。 a[i]=a[i-1]-(a[i-1]/2+1) => a[i-1]=2(a[i]+1)*/#in…… 题解列表 2022年10月04日 0 点赞 0 评论 320 浏览 评分:0.0
1019-自由下落的距离计算 语言:C++ 摘要:解题思路:注意事项:参考代码:/*/2:n次求和:前n-1次 */#include<iostream>using namespace std;int main(){ double m; int n; …… 题解列表 2022年10月04日 0 点赞 0 评论 261 浏览 评分:0.0
1018-有规律的数列求和 语言:C++ 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin >>n; int a[n]={2,3},b[n]…… 题解列表 2022年10月04日 0 点赞 0 评论 256 浏览 评分:0.0
1017-完数的判断 语言:C++ 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin >>n; for(int i=2;i…… 题解列表 2022年10月04日 0 点赞 0 评论 299 浏览 评分:0.0
1016-水仙花数判断 语言:C++ 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ int a,b,c=3; …… 题解列表 2022年10月04日 0 点赞 0 评论 306 浏览 评分:0.0
1015-求和训练 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;typedef long long LL;LL sum(int a){ LL res=0; f…… 题解列表 2022年10月04日 0 点赞 0 评论 264 浏览 评分:0.0