結果

問題 No.810 割った余りの個数
ユーザー chika0707chika0707
提出日時 2019-04-12 21:30:36
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 1,487 bytes
コンパイル時間 1,056 ms
コンパイル使用メモリ 68,336 KB
実行使用メモリ 24,876 KB
最終ジャッジ日時 2023-10-12 18:51:36
合計ジャッジ時間 4,135 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
20,904 KB
testcase_01 AC 59 ms
22,880 KB
testcase_02 AC 58 ms
20,752 KB
testcase_03 AC 59 ms
18,904 KB
testcase_04 AC 59 ms
22,728 KB
testcase_05 AC 60 ms
22,788 KB
testcase_06 AC 59 ms
22,884 KB
testcase_07 AC 58 ms
20,792 KB
testcase_08 AC 58 ms
22,772 KB
testcase_09 AC 58 ms
20,848 KB
testcase_10 AC 58 ms
22,840 KB
testcase_11 AC 58 ms
20,868 KB
testcase_12 AC 57 ms
22,792 KB
testcase_13 AC 58 ms
22,856 KB
testcase_14 AC 58 ms
20,828 KB
testcase_15 AC 58 ms
20,836 KB
testcase_16 AC 59 ms
20,756 KB
testcase_17 AC 58 ms
20,724 KB
testcase_18 AC 58 ms
20,824 KB
testcase_19 AC 58 ms
20,744 KB
testcase_20 AC 58 ms
20,916 KB
testcase_21 AC 58 ms
20,776 KB
testcase_22 AC 58 ms
20,904 KB
testcase_23 AC 58 ms
20,744 KB
testcase_24 AC 57 ms
20,728 KB
testcase_25 AC 59 ms
20,940 KB
testcase_26 AC 59 ms
22,876 KB
testcase_27 AC 59 ms
20,936 KB
testcase_28 AC 59 ms
18,688 KB
testcase_29 AC 60 ms
24,876 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;
    private struct Pair { public int x, y; }
    public static void Main()
    {
        int L = NextInt();
        int R = NextInt();
        int M = NextInt();
        R -= L;
        if (R >= M) Console.WriteLine(M);
        else Console.WriteLine(R + 1);
    }
}

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 char NextChar() { Confirm(); return char.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