結果

問題 No.72 そろばん Med
ユーザー mban
提出日時 2017-01-01 22:05:16
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 469 bytes
コンパイル時間 973 ms
コンパイル使用メモリ 109,008 KB
実行使用メモリ 25,928 KB
最終ジャッジ日時 2024-12-16 05:19:23
合計ジャッジ時間 2,485 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 24
権限があれば一括ダウンロードができます
コンパイルメッセージ
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()
    {
        long N = long.Parse(Console.ReadLine());
        long MOD = 1000007;
        long ans = 0;
        ans += N / 2 * (N + 1) / 2 % MOD;
        ans += (N + 1) / 2;
        ans %= MOD;
        Console.WriteLine(ans);
    }
}

0