[問題] ACM 10302 Summation of Polynomials
題目
http://luckycat.kshs.kh.edu.tw/homework/q10302.htm
code
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int num;
while(cin>>num)
{
if(num<1 || num>50000)
break;
cout<<(long long) (pow(num,2)*pow(num+1,2)/4)<<endl;
}
system("pause");
return 0;
}
online judge結果
Hi,
This is an automated response from UVa Online Judge.
Your submission with number 7340552 for the problem 10302 - Summation of
Polynomials has failed with verdict Wrong answer.
Although your program was successful at compilation and execution stages, it
was not able of solving the proposed problem.
Best regards,
The UVa Online Judge team
我不知道錯在哪 不知道測資是甚麼 我自己測的話 沒問題
有人可以救救我嗎 - -
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.117.172.23
推
08/25 15:21, , 1F
08/25 15:21, 1F
→
08/25 15:22, , 2F
08/25 15:22, 2F
→
08/25 15:23, , 3F
08/25 15:23, 3F
推
08/25 15:26, , 4F
08/25 15:26, 4F
→
08/25 15:27, , 5F
08/25 15:27, 5F
→
08/25 15:28, , 6F
08/25 15:28, 6F
→
08/25 16:05, , 7F
08/25 16:05, 7F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章