编写题解 1013: [编程入门]Sn的公式求和 摘要:解题思路:当然是用循环来解决,先把每个数字写出来,存在列表里,再遍历列表把他们加起来参考代码:import math n=int(input()) lis=[] a=0 b=0 for i …… 题解列表 2023年03月29日 0 点赞 0 评论 95 浏览 评分:0.0
Sn公式求和_标题还短吗 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include <string.h>int main(){ int n =0; int sum = 0; scanf…… 题解列表 2023年03月31日 0 点赞 0 评论 101 浏览 评分:0.0
1013题: Sn的公式求和 摘要:# 自己写的代码 ```c #include int main() { int n,a,sn; scanf("%d",&n); for(int i=0;i…… 题解列表 2023年04月26日 0 点赞 0 评论 160 浏览 评分:0.0
[编程入门]Sn的公式求和 摘要:一、解题思路:for()循环C参考代码:#include <stdio.h> int main(){ int n,a=2,s=0,sn=0; scanf("%d",&n); …… 题解列表 2023年05月05日 0 点赞 0 评论 142 浏览 评分:0.0
[编程入门]Sn的公式求和 摘要:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,Sn=2,a=2; cin>>n; for(int…… 题解列表 2023年05月29日 0 点赞 0 评论 107 浏览 评分:0.0
[编程入门]Sn的公式求和(python) 摘要:解题思路:注意事项:参考代码:n=int(input())a=0for i in range(n+1): for j in range(i): b=2*10**j a…… 题解列表 2023年06月09日 0 点赞 0 评论 135 浏览 评分:0.0
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 评论 151 浏览 评分:0.0
1013-Sn的公式求和 摘要:解题思路:采用高精度加法解决本题。注意事项:参考代码:int arr[1000]={0}; int main(){ int n; int i,len,j; len=0; scanf(…… 题解列表 2023年06月23日 0 点赞 0 评论 68 浏览 评分: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 评论 103 浏览 评分:0.0
Sn的公式求和(Java) 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main { public static void main(String[] a…… 题解列表 2023年08月10日 0 点赞 0 评论 89 浏览 评分:0.0