結果

問題 No.3062 A + B
ユーザー matamatajupitermatamatajupiter
提出日時 2020-04-01 23:15:56
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 487 bytes
コンパイル時間 3,464 ms
コンパイル使用メモリ 105,948 KB
実行使用メモリ 23,592 KB
最終ジャッジ日時 2023-09-09 20:05:15
合計ジャッジ時間 5,055 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
21,580 KB
testcase_01 AC 58 ms
21,464 KB
testcase_02 AC 58 ms
21,448 KB
testcase_03 AC 68 ms
23,516 KB
testcase_04 AC 67 ms
23,592 KB
testcase_05 AC 58 ms
21,472 KB
testcase_06 AC 66 ms
23,564 KB
testcase_07 AC 58 ms
21,472 KB
testcase_08 AC 53 ms
23,300 KB
testcase_09 AC 65 ms
21,532 KB
testcase_10 AC 53 ms
21,132 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

class Progaram
{
    static void Main(string[] args)
    {
        var l = Console.ReadLine().Split(' ');
        if (l[0] == "0" || l[0] == "-0")
        {
            Console.WriteLine(l[1]);
        } 
        else if (double.Parse(l[1]) < 0)
        {
            Console.WriteLine(l.Select(x => double.Parse(x)).Sum());
        }
        else
        {
            Console.WriteLine(l[0] + l[1]);
        }
    }
}
0