sum numbers

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

given an int n, sum up the numbers from 1 to n and return the result

Options

rejudge feature is enabled

now post-mortem time, all source codes will be revealed

Sample input:_

5

Sample output:

15

Sample input:_

4

Sample output:

10

Sample input:_

3

Sample output:

6

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1rad190.04912026/03/04 04:25:240B / ?B / ?B
2moon210.04902026/01/04 21:02:580B / 13B / 7B
3#c0ffee210.04902026/01/05 07:29:190B / 11B / 9B

Ruby2 _

RankUserSizeTimeDateStatistics
1rad190.25802026/03/04 04:23:520B / ?B / ?B

Perl _

RankUserSizeTimeDateStatistics
1test1140.05532025/12/27 16:57:450B / ?B / ?B

J _

RankUserSizeTimeDateStatistics
1tubular160.05632026/01/05 15:17:590B / 7B / 9B

K _

RankUserSizeTimeDateStatistics
1tubular140.04312026/01/05 15:13:450B / 3B / 11B

iogii _

RankUserSizeTimeDateStatistics
1#c0ffee20.05402025/12/28 16:45:470B / 0B / 2B
2tubular50.05902026/01/05 15:27:490B / 5B / 0B

C _

RankUserSizeTimeDateStatistics
1moon450.05082025/12/28 00:31:450B / 25B / 20B

sed _

RankUserSizeTimeDateStatistics
1McBusLuck160.04182026/03/04 16:57:340B / ?B / ?B

Whitespace _

RankUserSizeTimeDateStatistics
1%20420.08142025/12/31 05:03:240B / 0B / 0B

Nibbles _

RankUserSizeTimeDateStatistics
1tails10.05292025/12/31 01:53:071B / 0B / 0B

FerNANDo _

RankUserSizeTimeDateStatistics
1%20490.12432025/12/31 07:38:330B / 25B / 0B

Language Ranking_

RankLangUserSizeScore
1Nibblestails110000
2iogii#c0ffee25000
3Perltest114714
4Ktubular14714
5Jtubular16625
6sedMcBusLuck16625
7Ruby2rad19526
8Rubyrad19526
9Whitespace%2042238
10Cmoon45222
11FerNANDo%2049204

return to the top page