結果

問題 No.276 連続する整数の和(1)
ユーザー mbanmban
提出日時 2016-12-23 14:58:44
言語 C#
(csc 3.9.0)
結果
AC  
実行時間 53 ms / 1,000 ms
コード長 376 bytes
コンパイル時間 1,789 ms
使用メモリ 14,776 KB
最終ジャッジ日時 2023-01-07 17:31:03
合計ジャッジ時間 3,317 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 52 ms
14,592 KB
testcase_01 AC 51 ms
14,740 KB
testcase_02 AC 53 ms
14,616 KB
testcase_03 AC 52 ms
14,776 KB
testcase_04 AC 52 ms
14,636 KB
testcase_05 AC 53 ms
14,612 KB
testcase_06 AC 53 ms
14,648 KB
testcase_07 AC 53 ms
14,688 KB
testcase_08 AC 52 ms
14,700 KB
testcase_09 AC 52 ms
14,608 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;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;

class Magatro
{
    static void Main()
    {
        int N = int.Parse(Console.ReadLine());
        if (N % 2 == 1) Console.WriteLine(N);
        else Console.WriteLine(N / 2);
    }

}

0