Submission #1869485


Source Code Expand

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

public class Program
{
    public static void Main()
    {
        string s = Console.ReadLine();
        Console.WriteLine(s.Length - (Atcoder.strReverce(s).IndexOf("Z"))-(s.IndexOf("A")));
    }

}




public class Atcoder
{
    static void Swap<T>(ref T a, ref T b)
    {
        var t = a;
        a = b;
        b = t;
    }
    public static int LCM(int a, int b)
    {
        int c = a * b;
        if (a < b) Swap(ref a, ref b);
        int d = a % b;
        while (d != 0)
        {
            a = b;
            b = d;
            d = a % b;
        }
        return c / b;
    }
    public static string strReverce(string s) {
        string s_ = new string(s.Reverse().ToArray());
        return s_;
    }

    public static List<int> IndexOfPlural(string a, string b)
    {
        List<int> list = new List<int>();
        if (a.Length == 0 || b.Length == 0) { list.Add(-1); return list; }
        if (a.IndexOf(b) == -1) { list.Add(-1); return list; }
        int box = 0;
        int revision = 0;
        while (true)
        {
            if (a.Length == 0) break;
            box = a.IndexOf(b);
            if (box == -1) { break; }
            else
            {
                list.Add(box + revision);
                a = a.Remove(box, b.Length);
                revision += b.Length;
            }
        }
        return list;
    }
}

Submission Info

Submission Time
Task B - A to Z String
User chika_haru
Language C# (Mono 4.6.2.0)
Score 200
Code Size 1527 Byte
Status AC
Exec Time 36 ms
Memory 17120 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 12
Set Name Test Cases
Sample 00_example_01.txt, 00_example_02.txt, 00_example_03.txt
All 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt
Case Name Status Exec Time Memory
00_example_01.txt AC 26 ms 9312 KB
00_example_02.txt AC 26 ms 11360 KB
00_example_03.txt AC 27 ms 11360 KB
01.txt AC 33 ms 12896 KB
02.txt AC 32 ms 12640 KB
03.txt AC 30 ms 15200 KB
04.txt AC 30 ms 13152 KB
05.txt AC 33 ms 13024 KB
06.txt AC 36 ms 15072 KB
07.txt AC 35 ms 17120 KB
08.txt AC 34 ms 15072 KB
09.txt AC 34 ms 15072 KB