結果

問題 No.9012 二数の足し算
ユーザー proglab-korienproglab-korien
提出日時 2022-10-23 15:55:57
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 979 bytes
コンパイル時間 1,060 ms
コンパイル使用メモリ 65,756 KB
実行使用メモリ 22,872 KB
最終ジャッジ日時 2023-09-15 02:08:31
合計ジャッジ時間 3,007 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
20,824 KB
testcase_01 AC 60 ms
22,840 KB
testcase_02 AC 60 ms
22,872 KB
testcase_03 AC 60 ms
22,756 KB
testcase_04 AC 60 ms
20,856 KB
testcase_05 AC 60 ms
20,820 KB
testcase_06 AC 59 ms
20,716 KB
testcase_07 AC 60 ms
22,836 KB
testcase_08 AC 60 ms
20,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
class Scanner
{
    string[] s;
    int i;
    char[] cs = new char[] { ' ', ',' };
    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string Next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        if (s.Length == 0) return Next();
        i = 0;
        return s[i++];
    }

    public int NextInt()
    {
        return int.Parse(Next());
    }

    public long NextLong()
    {
        return long.Parse(Next());
    }
}



public class Hello{
    public static void Main(){
        // Your code here!
        var scanner = new Scanner();
        int a= scanner.NextInt();
        int b= scanner.NextInt();
        Hello obj = new Hello();
        Console.WriteLine("a + b = {0}", obj.Sum(a,b));
    }
    private int Sum(int a, int b){
       return a+b;
    }
}
0