Submission #49692017


Source Code Expand

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;

namespace Tasks;

public class A
{
    public static void Main()
    {
        using var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
        Console.SetOut(sw);
        Solve();
        Console.Out.Flush();
    }

    public static void Solve()
    {
        var S = Scanner.Scan<string>();
        var answer = char.IsUpper(S[0]);
        for (var i = 1; i < S.Length; i++)
        {
            answer &= char.IsLower(S[i]);
        }

        Console.WriteLine(answer ? "Yes" : "No");
    }

    public static class Scanner
    {
        public static T Scan<T>() where T : IConvertible => Convert<T>(ScanStringArray()[0]);
        public static (T1, T2) Scan<T1, T2>() where T1 : IConvertible where T2 : IConvertible
        {
            var input = ScanStringArray();
            return (Convert<T1>(input[0]), Convert<T2>(input[1]));
        }
        public static (T1, T2, T3) Scan<T1, T2, T3>() where T1 : IConvertible where T2 : IConvertible where T3 : IConvertible
        {
            var input = ScanStringArray();
            return (Convert<T1>(input[0]), Convert<T2>(input[1]), Convert<T3>(input[2]));
        }
        public static (T1, T2, T3, T4) Scan<T1, T2, T3, T4>() where T1 : IConvertible where T2 : IConvertible where T3 : IConvertible where T4 : IConvertible
        {
            var input = ScanStringArray();
            return (Convert<T1>(input[0]), Convert<T2>(input[1]), Convert<T3>(input[2]), Convert<T4>(input[3]));
        }
        public static (T1, T2, T3, T4, T5) Scan<T1, T2, T3, T4, T5>() where T1 : IConvertible where T2 : IConvertible where T3 : IConvertible where T4 : IConvertible where T5 : IConvertible
        {
            var input = ScanStringArray();
            return (Convert<T1>(input[0]), Convert<T2>(input[1]), Convert<T3>(input[2]), Convert<T4>(input[3]), Convert<T5>(input[4]));
        }
        public static (T1, T2, T3, T4, T5, T6) Scan<T1, T2, T3, T4, T5, T6>() where T1 : IConvertible where T2 : IConvertible where T3 : IConvertible where T4 : IConvertible where T5 : IConvertible where T6 : IConvertible
        {
            var input = ScanStringArray();
            return (Convert<T1>(input[0]), Convert<T2>(input[1]), Convert<T3>(input[2]), Convert<T4>(input[3]), Convert<T5>(input[4]), Convert<T6>(input[5]));
        }
        public static IEnumerable<T> ScanEnumerable<T>() where T : IConvertible => ScanStringArray().Select(Convert<T>);
        private static string[] ScanStringArray()
        {
            var line = Console.ReadLine()?.Trim() ?? string.Empty;
            return string.IsNullOrEmpty(line) ? Array.Empty<string>() : line.Split(' ');
        }
        private static T Convert<T>(string value) where T : IConvertible => (T)System.Convert.ChangeType(value, typeof(T));
    }
}

Submission Info

Submission Time
Task A - Capitalized?
User AconCavy
Language C# 11.0 (.NET 7.0.7)
Score 100
Code Size 3009 Byte
Status AC
Exec Time 45 ms
Memory 24936 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 4
AC × 19
Set Name Test Cases
Sample 01-sample.txt, 02-sample.txt, 03-sample.txt, 04-sample.txt
All 01-sample.txt, 02-sample.txt, 03-sample.txt, 04-sample.txt, 05-hidden.txt, 06-hidden.txt, 07-hidden.txt, 08-hidden.txt, 09-hidden.txt, 10-hidden.txt, 11-hidden.txt, 12-hidden.txt, 13-hidden.txt, 14-hidden.txt, 15-hidden.txt, 16-hidden.txt, 17-hidden.txt, 18-hidden.txt, 19-hidden.txt
Case Name Status Exec Time Memory
01-sample.txt AC 38 ms 24660 KiB
02-sample.txt AC 38 ms 24660 KiB
03-sample.txt AC 41 ms 24496 KiB
04-sample.txt AC 41 ms 24628 KiB
05-hidden.txt AC 40 ms 24792 KiB
06-hidden.txt AC 45 ms 24772 KiB
07-hidden.txt AC 36 ms 24516 KiB
08-hidden.txt AC 34 ms 24484 KiB
09-hidden.txt AC 35 ms 24680 KiB
10-hidden.txt AC 35 ms 24632 KiB
11-hidden.txt AC 35 ms 24484 KiB
12-hidden.txt AC 41 ms 24616 KiB
13-hidden.txt AC 34 ms 24640 KiB
14-hidden.txt AC 40 ms 24640 KiB
15-hidden.txt AC 41 ms 24788 KiB
16-hidden.txt AC 33 ms 24396 KiB
17-hidden.txt AC 31 ms 24936 KiB
18-hidden.txt AC 40 ms 24620 KiB
19-hidden.txt AC 37 ms 24480 KiB