結果
| 問題 |
No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
|
| ユーザー |
くれちー
|
| 提出日時 | 2017-07-18 21:31:36 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 228 ms / 3,000 ms |
| コード長 | 1,993 bytes |
| コンパイル時間 | 2,515 ms |
| コンパイル使用メモリ | 107,648 KB |
| 実行使用メモリ | 56,120 KB |
| 最終ジャッジ日時 | 2024-12-25 16:18:16 |
| 合計ジャッジ時間 | 4,284 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 15 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using static System.Convert;
using static System.Math;
using static Extentions;
class IO
{
int idx;
string[] input;
public IO(TextReader reader)
{
input = reader.ReadToEnd().Split(new[] { " ", Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
}
public string S => input[idx++];
public char C => char.Parse(input[idx++]);
public int I => int.Parse(input[idx++]);
public long L => long.Parse(input[idx++]);
public double F => double.Parse(input[idx++]);
public decimal D => decimal.Parse(input[idx++]);
public BigInteger B => BigInteger.Parse(input[idx++]);
public string[] Ss(int n) => input.Skip((idx += n) - n).Take(n).ToArray();
public char[] Cs(int n) => input.Skip((idx += n) - n).Take(n).Select(char.Parse).ToArray();
public int[] Is(int n) => input.Skip((idx += n) - n).Take(n).Select(int.Parse).ToArray();
public long[] Ls(int n) => input.Skip((idx += n) - n).Take(n).Select(long.Parse).ToArray();
public double[] Fs(int n) => input.Skip((idx += n) - n).Take(n).Select(double.Parse).ToArray();
public decimal[] Ds(int n) => input.Skip((idx += n) - n).Take(n).Select(decimal.Parse).ToArray();
public BigInteger[] Bs(int n) => input.Skip((idx += n) - n).Take(n).Select(BigInteger.Parse).ToArray();
public void Write<T>(params T[] xs) => Console.WriteLine(string.Join(" ", xs));
public void Write(params object[] xs) => Console.WriteLine(string.Join(" ", xs));
}
static class Extentions
{
}
class Program
{
public static void Main()
{
#if !DEBUG
Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
#endif
Solve(new IO(Console.In));
Console.Out.Flush();
}
public static void Solve(IO io)
{
var n = io.I;
var a = io.Ls(n);
io.Write(a.Sum());
}
}
くれちー