1162

 1 #include <iostream>
 2 using namespace std;
 3 int main()
 4 {
 5     int n ;
 6     while(cin>>n)   {
 7         cout << n*(n+1)/2 << endl << endl ;
 8     }
 9     return 0;
10 }
时间: 2024-10-17 01:24:55

1162的相关文章

hihoCoder #1162 : 骨牌覆盖问题&#183;三

#1162 : 骨牌覆盖问题·三 Time Limit:10000ms Case Time Limit:1000ms Memory Limit:256MB 描述 前两周里,我们讲解了2xN,3xN骨牌覆盖的问题,并且引入了两种不同的递推方法.这一次我们再加强一次题目,对于给定的K和N,我们需要去求KxN棋盘的覆盖方案数. 提示:KxN骨牌覆盖 输入 第1行:2个整数N.表示棋盘宽度为k,长度为N.2≤K≤7,1≤N≤100,000,000 输出 第1行:1个整数,表示覆盖方案数 MOD 1235

hdu 1162 Eddy&#39;s picture 最小生成树入门题 Prim+Kruskal两种算法AC

Eddy's picture Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7428    Accepted Submission(s): 3770 Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to

hdu 1162 Eddy&#39;s picture(最小生成树算法)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1162 Eddy's picture Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6866    Accepted Submission(s): 3469 Problem Description Eddy begins to like p

HDU 1162 Eddy&#39;s picture【最小生成树,Prime算法+Kruskal算法】

Eddy's picture Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9334    Accepted Submission(s): 4711 Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to

hdu 1162 Eddy&#39;s picture

最小生成树裸题,没有初始化都能AC,看来测试数据只有一组 #include<iostream> #include<vector> #include<cmath> #include<cstdio> #define inf 1<<30 #define maxn 105 using namespace std; struct stu { double x,y; }; stu mapp[maxn]; int n; vector<int>roo

hdoj 1162 Eddy&#39;s picture

并查集+最小生成树 Eddy's picture Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7669    Accepted Submission(s): 3882 Problem Description Eddy begins to like painting pictures recently ,he is sure of hi

HDU 1162 Eddy&#39;s picture(图论-最小生成树)

题目如下: Eddy's picture Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7267    Accepted Submission(s): 3676 Problem Description Eddy begins to like painting pictures recently ,he is sure of himse

hdu 1162 Eddy&#39;s picture(最小生成树)

Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his small room, and he usually puts out his newest pictures to let his friends appreciate. but the result i

hdoj 1162 Eddy&#39;s picture(最小生成树)

Eddy's picture http://acm.hdu.edu.cn/showproblem.php?pid=1162 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7521    Accepted Submission(s): 3821 Problem Description Eddy begins to like painti

Sicily 1162. Sudoku

1162. Sudoku Constraints Time Limit: 1 secs, Memory Limit: 32 MB , Special Judge Description Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are w