1013: [编程入门]Sn的公式求和 摘要:解题思路:递归解题,22为2*10的一次方+前一个数2,222为2*10二次方加前一个数22注意事项:参考代码:import java.util.Scanner;public class Main {…… 题解列表 2021年08月16日 0 点赞 0 评论 419 浏览 评分:0.0
C语言训练-"水仙花数"问题2 摘要:解题思路: 思路分为两步:首先计算数据(i)的每一位的n次方之和(sum),再把sum和i进行比较,如果相等,那么输出这个数。注意事项:下面是个通用的代码,不止可以来计算三位数的,只要把for循环里面…… 题解列表 2021年08月16日 0 点赞 0 评论 596 浏览 评分:0.0
jiechenheshu11111111000 摘要:解题思路:注意事项:参考代码:#include "stdio.h"#include "math.h"int J(int n) //求阶乘{ if (n == 1||n==0)return 1; i…… 题解列表 2021年08月16日 0 点赞 0 评论 227 浏览 评分:0.0
C语言训练-"水仙花数"问题2 摘要:#include<stdio.h>int main(void){ int w,i,j,k; for(w=100;w<=999;w++) { i=w/100; …… 题解列表 2021年08月17日 0 点赞 0 评论 243 浏览 评分:0.0
归并排序(Java代码) 摘要:```java package datastrutures; import java.util.Scanner; /* * 题目 1719: 数据结构-归并排序 */ publ…… 题解列表 2021年08月18日 0 点赞 0 评论 470 浏览 评分:0.0
简单快速的亲和数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m; while ((scanf("%d", &m)) != EOF ) { int x, y; f…… 题解列表 2021年08月18日 0 点赞 0 评论 308 浏览 评分:0.0
1116: IP判断(C++代码) 摘要:#include <iostream> #include <string> using namespace std; //判断ip是否合法 bool isLegal(string i…… 题解列表 2021年08月19日 0 点赞 0 评论 297 浏览 评分:0.0
编写题解 1206: 字符串问题(c++) 摘要:解题思路:相同的字符串进行逆转,用两个不同的变量i,j标记,i记录串尾位置,j记录串头位置,用个for循环就好参考代码: #include <iostream>#inclu…… 题解列表 2021年08月19日 0 点赞 0 评论 433 浏览 评分:0.0
1111111111111111111111 摘要:解题思路:注意事项:参考代码#include "stdio.h"int main() { int n, m; while (scanf("%d%d", &n, &m)!=EOF) { int num…… 题解列表 2021年08月19日 0 点赞 0 评论 422 浏览 评分:0.0
字符串反转,只需定义一个数组 摘要:解题思路: 逆序,循环输出注意事项:参考代码: #include<iostream> #include<cstring> using namespace std; int main(){ …… 题解列表 2021年08月19日 0 点赞 0 评论 280 浏览 评分:0.0