結果

問題 No.71 そろばん
ユーザー bluemeganebluemegane
提出日時 2018-10-03 20:19:52
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 60 ms / 5,000 ms
コード長 329 bytes
コンパイル時間 2,051 ms
コンパイル使用メモリ 101,860 KB
実行使用メモリ 22,732 KB
最終ジャッジ日時 2023-08-02 14:45:17
合計ジャッジ時間 4,540 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
22,696 KB
testcase_01 AC 54 ms
20,736 KB
testcase_02 AC 58 ms
22,632 KB
testcase_03 AC 57 ms
22,612 KB
testcase_04 AC 56 ms
18,764 KB
testcase_05 AC 57 ms
20,676 KB
testcase_06 AC 58 ms
20,724 KB
testcase_07 AC 56 ms
20,636 KB
testcase_08 AC 56 ms
20,528 KB
testcase_09 AC 58 ms
20,636 KB
testcase_10 AC 57 ms
20,592 KB
testcase_11 AC 56 ms
22,708 KB
testcase_12 AC 57 ms
22,560 KB
testcase_13 AC 59 ms
22,732 KB
testcase_14 AC 56 ms
20,756 KB
testcase_15 AC 58 ms
20,628 KB
testcase_16 AC 56 ms
20,508 KB
testcase_17 AC 57 ms
18,548 KB
testcase_18 AC 58 ms
20,816 KB
testcase_19 AC 59 ms
20,680 KB
testcase_20 AC 60 ms
20,668 KB
testcase_21 AC 59 ms
20,712 KB
testcase_22 AC 58 ms
20,564 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    public static void Main()
    {
        var n = long.Parse(Console.ReadLine().Trim());
        var ans = 0L;
        for (long i = 1; i <= n -1; i++)
        {
            var t = (i + 1) * (n - i) + i;
            ans = Math.Max(ans, t);
        }
        Console.WriteLine(ans);
    }
}
0