結果

問題 No.9001 標準入出力の練習問題(テスト用)
ユーザー くれちーくれちー
提出日時 2017-06-23 22:10:42
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 29 ms / 1,000 ms
コード長 1,778 bytes
コンパイル時間 1,092 ms
コンパイル使用メモリ 116,828 KB
実行使用メモリ 26,964 KB
最終ジャッジ日時 2024-04-10 11:43:19
合計ジャッジ時間 1,509 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
26,964 KB
testcase_01 AC 29 ms
25,200 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

#pragma warning disable IDE0011
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;

class ReaderWriter
{
    protected int _Index;
    protected string[] _Line;

    public void R(char sep = ' ') { _Line = Console.ReadLine().Split(sep); _Index = 0; }
    public string S() => _Line[_Index++];
    public string[] Ss() => _Line.Skip(_Index++).ToArray();
    public char C() => char.Parse(_Line[_Index++]);
    public char[] Cs() => _Line.Skip(_Index++).Select(char.Parse).ToArray();
    public int I() => int.Parse(_Line[_Index++]);
    public int[] Is() => _Line.Skip(_Index++).Select(int.Parse).ToArray();
    public long L() => long.Parse(_Line[_Index++]);
    public long[] Ls() => _Line.Skip(_Index++).Select(long.Parse).ToArray();
    public double F() => double.Parse(_Line[_Index++]);
    public double[] Fs() => _Line.Skip(_Index++).Select(double.Parse).ToArray();
    public decimal D() => decimal.Parse(_Line[_Index++]);
    public decimal[] Ds() => _Line.Skip(_Index++).Select(decimal.Parse).ToArray();
    public BigInteger B() => BigInteger.Parse(_Line[_Index++]);
    public BigInteger[] Bs() => _Line.Skip(_Index++).Select(BigInteger.Parse).ToArray();

    public void Write(params object[] xs)
    {
        Console.Write(xs.First());
        foreach (var x in xs.Skip(1)) Console.Write(" " + x);
        Console.WriteLine();
    }
}

class Program
{
    static void Main()
    {
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        Solve(new ReaderWriter());
        Console.Out.Flush();
    }

    static void Solve(ReaderWriter rw)
    {
        rw.R(); var a = rw.I(); var b = rw.I();
        rw.R(); var s = rw.S();

        rw.Write(a + b, s);
    }
}
0