結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー #ラス+#ラス+
提出日時 2019-11-06 20:55:56
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 363 ms / 3,000 ms
コード長 1,339 bytes
コンパイル時間 1,752 ms
コンパイル使用メモリ 63,632 KB
実行使用メモリ 45,652 KB
最終ジャッジ日時 2023-10-13 02:43:24
合計ジャッジ時間 5,581 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
20,864 KB
testcase_01 AC 61 ms
20,772 KB
testcase_02 AC 62 ms
20,648 KB
testcase_03 AC 62 ms
22,836 KB
testcase_04 AC 61 ms
20,804 KB
testcase_05 AC 62 ms
20,900 KB
testcase_06 AC 63 ms
20,728 KB
testcase_07 AC 72 ms
21,696 KB
testcase_08 AC 108 ms
30,232 KB
testcase_09 AC 142 ms
30,756 KB
testcase_10 AC 314 ms
44,560 KB
testcase_11 AC 318 ms
42,860 KB
testcase_12 AC 324 ms
41,068 KB
testcase_13 AC 333 ms
45,652 KB
testcase_14 AC 327 ms
42,868 KB
testcase_15 AC 332 ms
44,832 KB
testcase_16 AC 363 ms
42,640 KB
testcase_17 AC 60 ms
20,840 KB
testcase_18 AC 61 ms
20,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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();
    long a=0;
    for(int i=0;i<n;i++)a+=Rlon();
    Write(a+LF);
  }
  static void Main(){
    read=new List<string>();
    readcount=-1;
    string s;
    while(true){
      s=ReadLine();
      if(s==null)break;
      read.AddRange(s.Trim().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 List<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;
}
0