結果

問題 No.1089 三変数方程式
ユーザー bluemeganebluemegane
提出日時 2020-06-24 15:56:23
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 434 bytes
コンパイル時間 874 ms
コンパイル使用メモリ 60,980 KB
実行使用メモリ 22,808 KB
最終ジャッジ日時 2023-09-16 21:06:07
合計ジャッジ時間 2,842 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,684 KB
testcase_01 AC 56 ms
20,688 KB
testcase_02 AC 55 ms
18,752 KB
testcase_03 AC 66 ms
18,668 KB
testcase_04 AC 57 ms
18,636 KB
testcase_05 AC 72 ms
22,808 KB
testcase_06 AC 59 ms
20,680 KB
testcase_07 AC 56 ms
20,688 KB
testcase_08 AC 69 ms
20,688 KB
testcase_09 AC 56 ms
20,692 KB
testcase_10 AC 66 ms
20,744 KB
testcase_11 AC 59 ms
20,792 KB
testcase_12 AC 64 ms
22,760 KB
testcase_13 AC 58 ms
20,684 KB
testcase_14 AC 65 ms
20,608 KB
testcase_15 AC 68 ms
18,664 KB
testcase_16 AC 67 ms
20,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        getAns(n);
    }
    static void getAns( int n)
    {
        var count = 0;
        for (int i = 0; i <= n; i++)
            for (int j = 0; j <= n; j++)
            {
                var t = n - i - j;
                if (t >= 0 && t <= n) count++;
            }
        Console.WriteLine(count);
    }
}
0