1021: [编程入门]迭代法求平方根 解题思路:说是迭代法求平方根,但没必要写一个函数进行迭代(因为迭代公式中a的值始终不变,我太菜了也不知道这种情况怎么写迭代函数),直接用while循环进行求解就好注意事项:需要设置一个中间变量m,用来存储第一次迭代公式中的X[n](这一项在第一次迭代时值与a相等), 题解列表 2023年12月01日 0 点赞 0 评论 466 浏览 评分:0.0
Yu: 1120水仙花数 **解题思路:**使用while循环对每一位数拆解**参考答案**```c++#includeusingnamespacestd;intmain(){intk,p,sum;for(inti=100;i<1000;i++){k=i,sum=0;while(k){p=k%10;sum+=p*p*p;k/= 题解列表 2023年12月01日 0 点赞 0 评论 433 浏览 评分:0.0
[递归]阶乘求和 摘要:解题思路:递归注意事项:参考代码:def fact(n): if n == 0 or n == 1: return 1 else:   题解列表 2023年12月01日 0 点赞 0 评论 514 浏览 评分:0.0
[字符串复制]Sn的公式求和 摘要:解题思路:注意事项:参考代码:n = int(input()) Sum = 0 for i in range(1, n + 1): Sum += int('2' * i)…… 题解列表 2023年12月01日 0 点赞 0 评论 2290 浏览 评分:0.0
c语言链表的排序 ```c#include#includetypedefstruct_student{intnum;intscore;}student;typedefstruct_Node{studentstu;//数据的打包,目的是后续分开指针,单独比较数据的内容比如num, 题解列表 2023年12月02日 0 点赞 0 评论 2219 浏览 评分:0.0
简单易懂的解题思路 摘要:解题思路:利用while循环和for循环的小白解题思路。注意事项:参考代码:#include<stdio.h>int main(){ int n, i; scanf("%d", &n);int a[n…… 题解列表 2023年12月02日 0 点赞 0 评论 534 浏览 评分:0.0
最简答案 一个一维数组就搞定 摘要:解题思路:x/n+1 可以算出在哪一行x%n+1可以算出在哪一列注意事项:简单无脑,把最后输的行列搞明白就行参考代码:#include<stdio.h>int main(){ int arr[200]…… 题解列表 2023年12月02日 0 点赞 0 评论 453 浏览 评分:0.0
编写题解 1052: [编程入门]链表合并 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<malloc.h>typedef struct Student{ int a,b; struct Student*n…… 题解列表 2023年12月02日 0 点赞 0 评论 536 浏览 评分:0.0
求圆的面积+公式 摘要:解题思路:圆面积=π*r*r注意事项:r=圆的半径参考代码:#include<iostream>using namespace std;#include <iomanip>int main(){ …… 题解列表 2023年12月02日 0 点赞 0 评论 967 浏览 评分:0.0
java字符串p型编码 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static String pEncoding(String…… 题解列表 2023年12月02日 0 点赞 0 评论 509 浏览 评分:0.0