最常规的解法-C语言 摘要:解题思路: 题目要求是多组输入,所以要使用EOF这个关键字;然后是输入输出部分的话,如果输入的第二个数小于153,则直接输出NO如果大于153直接输出在范围内的水仙花数。注意事项: 注意细节,别…… 题解列表 2022年11月22日 0 点赞 0 评论 419 浏览 评分:0.0
1042: [编程入门]电报加密(c语言代码超简单) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char a[1000]; int i; gets(a); for(i=0;…… 题解列表 2022年11月22日 0 点赞 0 评论 329 浏览 评分:0.0
动态规划,中规中矩。 摘要:解题思路:dp[i]表示下标在[dp[i],i]的元素集合符合条件,并且在[dp[i]+1,i]的元素集合不符合条件。也就是dp[i]是i作为右下标对应的最大左下标。所以只需判断l是否<=dp[r]即…… 题解列表 2022年11月22日 0 点赞 5 评论 2604 浏览 评分:8.1
十几行代码直接搞定好叭 摘要:解题思路:#include <stdio.h> int main() { int n,i,t; scanf("%d",&n); double a[n+1],an,max;//不用i…… 题解列表 2022年11月22日 0 点赞 2 评论 869 浏览 评分:9.6
宏定义之找最大数 摘要:解题思路:注意事项:参考代码:#include <stdio.h># define f(a, b, c) max = a>b?(b>c?a:(a>c?a:c)) : (b<c?c:b) int …… 题解列表 2022年11月22日 0 点赞 0 评论 292 浏览 评分:9.9
超详细通俗易懂C++,暴力求解 摘要:参考代码:#include<iostream> using namespace std; int main() { // 输入 int N; cin>>N; …… 题解列表 2022年11月23日 0 点赞 1 评论 351 浏览 评分:9.9
编写题解 1014: [编程入门]阶乘求和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){long long int i,j=1,n,Sn=0; scanf("%d",&n); if(n<=20) { …… 题解列表 2022年11月23日 0 点赞 0 评论 221 浏览 评分:0.0
编写题解 1015: [编程入门]求和训练 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b,x=0,y=0; float c,i,z=0.0,sum; sc…… 题解列表 2022年11月23日 0 点赞 0 评论 243 浏览 评分:0.0
编写题解 1016: [编程入门]水仙花数判断 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,i; for(i=100;i<=999;i++) { a=i/100; b=i/10%1…… 题解列表 2022年11月23日 0 点赞 0 评论 232 浏览 评分:0.0
c++利用指针循环计数(超级简单,全是c++基础语法) 摘要:解题思路:注意事项:参考代码:#includeusing namespace std;void fund(int a[], int n);int main() { int n; cin >> n; i…… 题解列表 2022年11月23日 0 点赞 0 评论 301 浏览 评分:9.9