Submission #169009


Source Code Expand

Copy
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Pair = System.Collections.Generic.KeyValuePair<int, int>;
class Program
{
    static void Main()
    {
        var sc = new Scanner();
        var s = sc.Integer();
        var t = sc.Integer();
        Console.WriteLine(t-s+1);
        
    }


}

public class Scanner
{
    readonly TextReader reader;
    string[] buffer = new string[0];
    int position;

    public char[] Separator { get; set; }
    public Scanner(TextReader reader = null, string separator = null)
    {
        if (reader == null)
            this.reader = Console.In;
        else
            this.reader = reader;
        if (string.IsNullOrEmpty(separator))
            separator = " ";
        this.Separator = separator.ToCharArray();

    }
    public string Scan()
    {
        if (this.position < this.buffer.Length)
            return this.buffer[this.position++];
        this.buffer = this.reader.ReadLine().Split(this.Separator, StringSplitOptions.RemoveEmptyEntries);
        this.position = 0;
        return this.buffer[this.position++];
    }

    public string[] ScanToEndLine()
    {
        if (this.position >= this.buffer.Length)
            return this.reader.ReadLine().Split(this.Separator, StringSplitOptions.RemoveEmptyEntries);
        var size = this.buffer.Length - this.position;
        var ar = new string[size];
        Array.Copy(this.buffer, position, ar, 0, size);
        return ar;

    }

    public string ScanLine()
    {
        if (this.position >= this.buffer.Length)
            return this.reader.ReadLine();
        else
        {
            var sb = new StringBuilder();
            for (; this.position < buffer.Length; this.position++)
            {
                sb.Append(this.buffer[this.position]);
                sb.Append(' ');
            }
            return sb.ToString();
        }
    }
    public string[] ScanArray(int length)
    {
        var ar = new string[length];
        for (int i = 0; i < length; i++)
        {
            ar[i] = this.Scan();
        }
        return ar;
    }

    public int Integer()
    {
        return int.Parse(this.Scan());
    }
    public long Long()
    {
        return long.Parse(this.Scan());
    }
    public double Double()
    {
        return double.Parse(this.Scan());
    }

    public int[] IntArray(int length)
    {
        var a = new int[length];
        for (int i = 0; i < length; i++)
            a[i] = this.Integer();
        return a.ToArray();
    }
    public long[] LongArray(int length)
    {
        var a = new long[length];
        for (int i = 0; i < length; i++)
            a[i] = this.Long();
        return a.ToArray();
    }
    public double[] DoubleArray(int length)
    {
        var a = new double[length];
        for (int i = 0; i < length; i++)
            a[i] = this.Double();
        return a.ToArray();
    }

}
static public partial class EnumerableEx
{
    static public string AsString(this IEnumerable<char> source)
    {
        return new string(source.ToArray());
    }
}
//*/

Submission Info

Submission Time
Task A - アルバム
User camypaper
Language C# (Mono 2.10.8.1)
Score 100
Code Size 3244 Byte
Status AC
Exec Time 185 ms
Memory 8492 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 17
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All sample_01.txt, sample_02.txt, case_01.txt, case_02.txt, case_03.txt, case_04.txt, case_05.txt, case_06.txt, case_07.txt, case_08.txt, case_09.txt, case_10.txt, case_11.txt, case_12.txt, case_13.txt, case_14.txt, case_15.txt
Case Name Status Exec Time Memory
case_01.txt AC 179 ms 8488 KB
case_02.txt AC 172 ms 8480 KB
case_03.txt AC 171 ms 8480 KB
case_04.txt AC 166 ms 8472 KB
case_05.txt AC 176 ms 8480 KB
case_06.txt AC 175 ms 8480 KB
case_07.txt AC 185 ms 8456 KB
case_08.txt AC 176 ms 8484 KB
case_09.txt AC 174 ms 8488 KB
case_10.txt AC 180 ms 8492 KB
case_11.txt AC 175 ms 8484 KB
case_12.txt AC 177 ms 8476 KB
case_13.txt AC 175 ms 8488 KB
case_14.txt AC 162 ms 8468 KB
case_15.txt AC 182 ms 8488 KB
sample_01.txt AC 170 ms 8488 KB
sample_02.txt AC 170 ms 8416 KB