結果

問題 No.906 Y字グラフ
ユーザー tomomo2b2tomomo2b2
提出日時 2019-10-11 22:10:56
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 66 ms / 2,000 ms
コード長 570 bytes
コンパイル時間 2,357 ms
コンパイル使用メモリ 99,836 KB
実行使用メモリ 23,008 KB
最終ジャッジ日時 2023-08-16 18:12:01
合計ジャッジ時間 5,691 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
22,924 KB
testcase_01 AC 62 ms
20,904 KB
testcase_02 AC 63 ms
22,936 KB
testcase_03 AC 63 ms
20,840 KB
testcase_04 AC 63 ms
20,800 KB
testcase_05 AC 62 ms
20,860 KB
testcase_06 AC 62 ms
20,872 KB
testcase_07 AC 62 ms
20,904 KB
testcase_08 AC 63 ms
22,904 KB
testcase_09 AC 62 ms
20,920 KB
testcase_10 AC 62 ms
22,932 KB
testcase_11 AC 63 ms
20,888 KB
testcase_12 AC 63 ms
20,728 KB
testcase_13 AC 63 ms
20,956 KB
testcase_14 AC 63 ms
18,840 KB
testcase_15 AC 62 ms
20,876 KB
testcase_16 AC 63 ms
22,960 KB
testcase_17 AC 62 ms
20,828 KB
testcase_18 AC 63 ms
20,956 KB
testcase_19 AC 63 ms
23,008 KB
testcase_20 AC 64 ms
22,968 KB
testcase_21 AC 64 ms
22,852 KB
testcase_22 AC 63 ms
20,924 KB
testcase_23 AC 63 ms
20,896 KB
testcase_24 AC 65 ms
20,908 KB
testcase_25 AC 64 ms
20,900 KB
testcase_26 AC 64 ms
20,920 KB
testcase_27 AC 65 ms
20,992 KB
testcase_28 AC 66 ms
20,984 KB
testcase_29 AC 63 ms
20,912 KB
testcase_30 AC 64 ms
20,984 KB
testcase_31 AC 65 ms
21,108 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.Linq;
using System.Collections.Generic;
using System.IO;
using System.Numerics;

class MyClass
{
    public static void Solve()
    {
        var N = BigInteger.Parse(Console.ReadLine());
        var X = (N - 1) * (N - 1) / 12;
        if (N % 6 == 4)
        {
            X++;
        }
        Console.WriteLine(X % 1000000007);
    }

    public static void Main()
    {
        var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
        Console.SetOut(sw);
        Solve();
        Console.Out.Flush();
    }
}
0