1001 1000            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2016-05-22 09:47:00
                            
                                7阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            Sum ProblemTime Limit: 1000/500 MS (Java/Others)    Memory Limit: 65536/32768 K (Ja            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2022-09-26 14:38:58
                            
                                46阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            #include<iostream>
using namespace std;
int main(){
    int n;
    while(cin>>n){
        int i,sum=0;
        for(i=1;i<=n;++i)
            sum+=i;
        cout<<sum<&            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2013-07-24 12:02:21
                            
                                728阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            BigZhuGod的粉丝
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 0    Accepted Submission(s): 0
Problem Description
真正的粉丝,是不需要题目描述的^_^。            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2022-09-07 10:57:29
                            
                                26阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            Time Limit: 1000/500 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 480655 Accepted Submission(s): 121603 Problem Desc            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-07-28 10:11:20
                            
                                67阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            /* 注意可以是负整数,而且在过程中会超过int,所以要用longlong*/#include int main(){ long long n; while (scanf("%lld",&n)!=EOF) (n<1)?printf("%d\n\n",(n+1)*(2-n)/2):printf("%d\n\n",n*(n+1)/2); return 0;}            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2014-02-11 19:50:00
                            
                                66阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            Sum ProblemTime Limit: 1000/500 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 113869Accepted Submission(s): 26069Problem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n.In            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2011-07-26 14:28:00
                            
                                57阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            1 #include 2 int main(){ 3 int k,sum; 4 while(scanf("%d",&k)!=EOF){ 5 if(k%2==0){ 6 sum=(1+k)*(k/2); 7 ...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2014-10-26 13:16:00
                            
                                44阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            
Problem Description
DouBiXp has a girlfriend named DouBiNan.One day they felt very boring and decided to play some games. The rule of this game is as following. There are k balls on the desk. Ever            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2015-05-11 21:42:00
                            
                                59阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            //package yy;不能有import java.util.*;public class Main {//必须为Main public static void main(String[] args) { Scanner reader=new Scanner(Syste...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2013-12-06 21:24:00
                            
                                39阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            #include<iostream>using namespace std;int main(){int a,b;int sum=0;cin>>a>>b;for(int i=1;i<=b;i++){sum=sum+i;}return 1;}#include<iostream>using namespace std;int main(){int a,b;int sum=0;cin>>a>>b;for(;a<=b;a++){sum=sum+a;}count<<a<<endl;cout<            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2011-10-06 23:01:00
                            
                                152阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            num = input()num = int(num)i = 0;while num != 1:  i += 1  if num % 2 == 1:    num = (num * 3 + 1) / 2  else:    num = num / 2print(i)            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-07-12 15:05:19
                            
                                10000+阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            Balls RearrangementTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 25Accepted Submission(s): 8Problem Description Bob has N balls and A boxes. He numbers the balls from 0 to N-1, and numbers the boxes from 0 to A-1. To find the balls easily, he pu.            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2013-07-25 17:29:00
                            
                                93阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            Poker ShuffleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 95Accepted Submission(s): 24Problem DescriptionJason is not only an ACMer, but also a poker nerd. He is able to do a perfect shuffle. In a perfect shuffle, the deck containing K cards, wh            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2013-09-29 16:56:00
                            
                                133阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            AnswersTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 25Accepted Submission(s): 16Problem DescriptionSample Input2 42 22 10 1 2 3Sample OutputNOYESYESYESSource2013 Multi-University Training Contest 10Recommendzhuyuanchen520分容易发现规律。如果M 8 #include            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2013-08-22 18:19:00
                            
                                75阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            Tetrahedron:写这个题时候,我和我的队友三人把核对了一下题意后就开始写了,一开始            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2022-09-19 09:56:30
                            
                                42阅读
                            
                                                                             
                 
                
                                
                     
                                    
                             
         
            
            
            
            Palindrome subsequenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65535 K (Java/Others)Total Submission(s): 88Accepted Submission(s): 26Problem DescriptionIn mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some elements without changing t            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2013-08-01 17:59:00
                            
                                119阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            1001Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#include<iostream>2#include<cmath>3usingnamespacestd;45//Whythelengthofarrayshouldbe1...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2010-05-18 22:35:00
                            
                                102阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            高精度 小数 位数是确定的 所以很好写 注意特判0 和小数点的取舍            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2018-06-11 09:57:00
                            
                                32阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            Arc of DreamTime Limit: 2000/2000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 0Accepted Submission(s): 0Problem DescriptionAn Arc of Dream is a curve defined by following function:wherea0 = A0ai = ai-1*AX+AYb0 = B0bi = bi-1*BX+BYWhat is the value of AoD(N) modulo 1,            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2013-08-20 19:28:00
                            
                                88阅读
                            
                                                                                    
                                2评论