結果

問題 No.111 あばばばば
ユーザー abL8ZLsTbFabL8ZLsTbF
提出日時 2016-04-28 12:35:19
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 794 ms / 5,000 ms
コード長 259 bytes
コンパイル時間 1,781 ms
コンパイル使用メモリ 107,856 KB
実行使用メモリ 25,916 KB
最終ジャッジ日時 2024-04-15 05:10:20
合計ジャッジ時間 2,821 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
23,612 KB
testcase_01 AC 24 ms
23,900 KB
testcase_02 AC 24 ms
23,516 KB
testcase_03 AC 794 ms
25,916 KB
testcase_04 AC 23 ms
21,684 KB
testcase_05 AC 25 ms
23,984 KB
testcase_06 AC 26 ms
21,336 KB
testcase_07 AC 100 ms
23,496 KB
testcase_08 AC 377 ms
23,644 KB
testcase_09 AC 24 ms
25,664 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 Program {
    public static void Main() {
        long n = long.Parse(Console.ReadLine());
        long ans = 0;
        for (long i = 3; i <= n; i += 2) {
            ans += n-i+1;
        }
        Console.WriteLine(ans);
    }
}
0