C语言问题.求和求数列的和Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19619 Accepted Submission(s): 11906Problem Description数列的定义如下:数列的第一项为n,以后
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/29 23:49:55
C语言问题.求和求数列的和Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19619 Accepted Submission(s): 11906Problem Description数列的定义如下:数列的第一项为n,以后
C语言问题.求和
求数列的和
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 19619 Accepted Submission(s): 11906
Problem Description
数列的定义如下:
数列的第一项为n,以后各项为前一项的平方根,求数列的前m项的和.
Input
输入数据有多组,每组占一行,由两个整数n(n
C语言问题.求和求数列的和Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19619 Accepted Submission(s): 11906Problem Description数列的定义如下:数列的第一项为n,以后
#include
#include
int main()
{
int n, m,i;
double sum,t,tempsum;
while(scanf("%d %d",&n,&m)!=EOF) //ctrl+Z结束循环.
{
sum=n;
tempsum=n;
for(i=1;i