zero-Sn的公式求和 摘要:解题思路:2+22+222可以转换为9+99+999再乘以2/9;注意事项:参考代码:/*题目 1013: [编程入门]Sn的公式求和题目描述求Sn=a+aa+aaa+…+aa…aaa(有n个a)之值…… 题解列表 2023年06月10日 0 点赞 0 评论 315 浏览 评分:0.0
1013-Sn的公式求和 摘要:解题思路:采用高精度加法解决本题。注意事项:参考代码:int arr[1000]={0}; int main(){ int n; int i,len,j; len=0; scanf(…… 题解列表 2023年06月23日 0 点赞 0 评论 187 浏览 评分:0.0
Sn的公式求和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int w,s,sn,i; scanf("%d",&i); i…… 题解列表 2023年07月18日 0 点赞 0 评论 293 浏览 评分:0.0
Sn的公式求和(Java) 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main { public static void main(String[] a…… 题解列表 2023年08月10日 0 点赞 0 评论 235 浏览 评分:0.0
Sn的公式求和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,sn=0; int t = 0; scanf("%d", &n); for (int i = 1;…… 题解列表 2023年10月26日 0 点赞 0 评论 252 浏览 评分:0.0
Sn公式求和记录 摘要:解题思路:用了math.h头文件里的pow()函数来求n次方注意事项:参考代码:#include<stdio.h> #include<math.h> int main() { int m=2…… 题解列表 2023年10月27日 0 点赞 0 评论 248 浏览 评分:0.0
1013c语言代码 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int i,n,a=2,s=2,sn=0; scanf("%d",&n); fo…… 题解列表 2023年11月06日 0 点赞 0 评论 231 浏览 评分:0.0
1013:Sn的公式求和 摘要:解题思路先用for循环把几个2表示出来,再用一个变量进行累加求和即可。注意事项:参考代码:n = int(input())a = 0sum = 0for i in range(n): a = 2…… 题解列表 2023年11月17日 0 点赞 0 评论 349 浏览 评分:0.0
or()循环里面的表达式 摘要:解题思路:首先确定n,是有几项相加,然后利用for()循环n次进行相加;其次就是每次计算时要加的项,也就是几个2,我的方法是: 1、先定义a=0; 2、由于后一项都比前一项…… 题解列表 2023年11月28日 0 点赞 0 评论 280 浏览 评分:0.0
[字符串复制]Sn的公式求和 摘要:解题思路:注意事项:参考代码:n = int(input()) Sum = 0 for i in range(1, n + 1): Sum += int('2' * i)…… 题解列表 2023年12月01日 0 点赞 0 评论 1522 浏览 评分:0.0