結果
問題 | No.480 合計 |
ユーザー | #ラス+ |
提出日時 | 2019-11-06 15:18:05 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 58 ms / 2,000 ms |
コード長 | 1,261 bytes |
コンパイル時間 | 865 ms |
コンパイル使用メモリ | 63,924 KB |
実行使用メモリ | 22,948 KB |
最終ジャッジ日時 | 2023-10-13 02:37:04 |
合計ジャッジ時間 | 3,253 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 57 ms
20,716 KB |
testcase_01 | AC | 57 ms
20,808 KB |
testcase_02 | AC | 57 ms
20,804 KB |
testcase_03 | AC | 58 ms
20,640 KB |
testcase_04 | AC | 58 ms
20,848 KB |
testcase_05 | AC | 57 ms
20,664 KB |
testcase_06 | AC | 57 ms
20,816 KB |
testcase_07 | AC | 58 ms
22,708 KB |
testcase_08 | AC | 58 ms
20,868 KB |
testcase_09 | AC | 58 ms
22,948 KB |
testcase_10 | AC | 57 ms
20,636 KB |
testcase_11 | AC | 57 ms
22,620 KB |
testcase_12 | AC | 57 ms
22,796 KB |
testcase_13 | AC | 58 ms
20,676 KB |
testcase_14 | AC | 57 ms
20,728 KB |
testcase_15 | AC | 58 ms
20,732 KB |
testcase_16 | AC | 58 ms
20,584 KB |
testcase_17 | AC | 57 ms
20,648 KB |
testcase_18 | AC | 58 ms
22,732 KB |
testcase_19 | AC | 58 ms
20,692 KB |
testcase_20 | AC | 57 ms
20,628 KB |
testcase_21 | AC | 58 ms
22,704 KB |
ソースコード
using System; using System.IO; using System.Collections.Generic; using static System.Console; using static System.Math; class Start{ static void Solve(){ var n=Rint(); Write(n*(n+1)/2+LF); } static void Main(){ string s,t=""; readcount=-1; while(true){ s=ReadLine(); if(s==null)break; t+=s.Trim()+" "; } read=t.Split(); var sw=new StreamWriter(OpenStandardOutput()){AutoFlush=false}; SetOut(sw); Solve(); Out.Flush(); } static string Read(){readcount++;return read[readcount];} static int Rint(){readcount++;return int.Parse(read[readcount]);} static long Rlon(){readcount++;return long.Parse(read[readcount]);} static double Rdou(){readcount++;return double.Parse(read[readcount]);} static char Rcha(){readcount++;return read[readcount][0];} static string[] read;static int readcount; const long MOD=1000000007L; const string LF="\n"; static void Swap<T>(ref T a,ref T b){T c=a;a=b;b=c;} } class Pair<T1,T2>:IComparable<Pair<T1,T2>>where T1:IComparable<T1>where T2:IComparable<T2>{ public T1 F;public T2 S; public Pair(T1 f,T2 s){F=f;S=s;} public int CompareTo(Pair<T1,T2> p)=>F.CompareTo(p.F)!=0?F.CompareTo(p.F):S.CompareTo(p.S); public override string ToString()=>F+" "+S; }