#include<iostream>
using namespace std;
int main()
{int n,sum;while(cin>>n){if(n%2==0)sum=n/2*(n+1);else sum=(n+1)/2*n;cout<<sum<<endl<<endl;}return 0;
}
详细解决方案
hdu 1001 Sum Problem
热度:15 发布时间:2023-12-04 20:21:18.0
相关解决方案
- 'Update Progress' has encountered a problem An internal error has occurred解决方案
- 'Update Progress' has encountered a problem An internal error has occurred解决方案
- devexpress卸载失败 ERROR 1001,该如何解决
- 每日背熟一句英语(7)The problem I'm running into is that the window is opening up modal
- 每日背熟一句英语(14)You don't have to feel very sorry for your problem
- 每天背熟一句英语(7)The problem I'm running into is that the window is opening up modal.解决方案
- 每天背熟一句英语(14)You don't have to feel very sorry for your problem.该怎么解决
- TortoiseSVN失误:svn there has been a problem contacting the server
- 这道题关于check log shipping and find out the problem,该如何处理
- a+b problem
- eclise导入已存在工程报 Faceted Project Problem 异常
- javascript problem,该怎么处理
- The problem is choice.解决办法
- <h2>Struts Problem Report</h2>该如何解决
- eclipse导入已存在工程报 Faceted Project Problem 异常
- eclipse启动时,揭示'dashboard' has encountered a problem
- MyEclipse总是弹出“Building workspace has encountered a problem. Errors during build.该怎么处理
- bootloader problem,该如何处理
- PHP curl报错“Problem (二) in the Chunked-Encoded data”解决方案
- CF:Problem 426B - Sereja and Mirroring 2分或者分治
- A Computer Graphics Problem 4176 2013上海市邀请赛
- 每天背熟一句英语(14)You don't have to feel very sorry for your problem.解决方法
- Android:problem in displaying the progressbar dialog
- Android2.1 Video player Video player problem,该怎么处理
- 安装软件时出现Error 1001.InstallUtilLib.dll: Unknown error.提醒,导致安装失败
- C# 在引用插件中 出现的有关问题| Csharp cite the plugin problem
- How to solve a login problem of SQL Server
- 洛谷 P1865 A % B Problem
- 紫书 习题 11-2 UVa 1001 (Floyd)
- 问题 B: Problem E