結果

問題 No.799 赤黒かーどげぇむ
ユーザー chika0707chika0707
提出日時 2019-03-17 21:26:42
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 1,447 bytes
コンパイル時間 1,615 ms
コンパイル使用メモリ 65,952 KB
実行使用メモリ 22,812 KB
最終ジャッジ日時 2023-09-22 03:33:27
合計ジャッジ時間 3,631 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
20,760 KB
testcase_01 AC 57 ms
22,756 KB
testcase_02 AC 56 ms
22,812 KB
testcase_03 AC 56 ms
20,800 KB
testcase_04 AC 56 ms
20,712 KB
testcase_05 AC 56 ms
20,664 KB
testcase_06 AC 56 ms
20,652 KB
testcase_07 AC 56 ms
20,788 KB
testcase_08 AC 58 ms
20,696 KB
testcase_09 AC 57 ms
20,724 KB
testcase_10 AC 57 ms
20,612 KB
testcase_11 AC 55 ms
20,764 KB
testcase_12 AC 56 ms
20,708 KB
testcase_13 AC 56 ms
20,840 KB
testcase_14 AC 56 ms
22,748 KB
testcase_15 AC 56 ms
20,908 KB
testcase_16 AC 55 ms
20,728 KB
testcase_17 AC 56 ms
22,752 KB
testcase_18 AC 56 ms
20,796 KB
testcase_19 AC 56 ms
20,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using static Input;

public class Prog
{
    private const int INF = 1000000007;
    private const long INFINITY = 9223372036854775807;
    public static void Main()
    {
        int A = NextInt();
        int B = NextInt();
        int C = NextInt();
        int D = NextInt();
        long ans = 0;
        for (int i = A; i <= B; i++)
            for (int j = C; j <= D; j++) ans += (i != j ? 1 : 0);
        Console.WriteLine(ans);
    }
}

public class Input
{
    private static Queue<string> q = new Queue<string>();
    private static void Confirm() { if (q.Count == 0) foreach (var s in Console.ReadLine().Split(' ')) q.Enqueue(s); }
    public static int NextInt() { Confirm(); return int.Parse(q.Dequeue()); }
    public static long NextLong() { Confirm(); return long.Parse(q.Dequeue()); }
    public static string NextString() { Confirm(); return q.Dequeue(); }
    public static double NextDouble() { Confirm(); return double.Parse(q.Dequeue()); }
    public static int[] LineInt() { return Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); }
    public static long[] LineLong() { return Console.ReadLine().Split(' ').Select(long.Parse).ToArray(); }
    public static string[] LineString() { return Console.ReadLine().Split(' ').ToArray(); }
    public static double[] LineDouble() { return Console.ReadLine().Split(' ').Select(double.Parse).ToArray(); }
}
0