Submission #181453


Source Code Expand

using System;
using System.Collections;
using System.Collections.Generic;

class Myon
{
    public Myon() { }
    public static int Main()
    {
        new Myon().calc();
        return 0;
    }

    void calc()
    {
        string s = getStringLine(1, 10);
        for (int i = 0; i < s.Length; i++)
        {
            if (!char.IsLower(s[i])) myon("not lower character");
        }
        Console.WriteLine(s + "pp");
    }


    //swap
    void swap<T>(ref T a, ref T b)
    {
        T c = a;
        a = b;
        b = c;
    }

    void myon(string s)
    {
        throw new Exception(s);
    }

    int getInt(string s, int min, int max)
    {
        int ret = int.Parse(s);
        if (ret < min) throw new Exception("low");
        if (ret > max) throw new Exception("high");
        return ret;
    }

    int getIntLine(int min, int max)
    {
        int ret = int.Parse(Console.ReadLine());
        if (ret < min) throw new Exception("low");
        if (ret > max) throw new Exception("high");
        return ret;
    }

    double getDouble(string s, double min, double max)
    {
        double ret = double.Parse(s);
        if (ret < min) throw new Exception("low");
        if (ret > max) throw new Exception("high");
        return ret;
    }

    double getDoubleLine(double min, double max)
    {
        double ret = double.Parse(Console.ReadLine());
        if (ret < min) throw new Exception("low");
        if (ret > max) throw new Exception("high");
        return ret;
    }

    string getString(string s, int min, int max)
    {
        if (s.Length < min) throw new Exception("low");
        if (s.Length > max) throw new Exception("high");
        return s;
    }

    string getStringLine(int min, int max)
    {
        string s = Console.ReadLine();
        if (s.Length < min) throw new Exception("low");
        if (s.Length > max) throw new Exception("high");
        return s;
    }

    string[] splitLine(int min, int max)
    {
        string[] ret = Console.ReadLine().Split(' ');
        if (ret.Length < min || ret.Length > max) throw new Exception("wrong length");
        return ret;
    }
}

Submission Info

Submission Time
Task A - ハンドルネーム
User chokudai
Language C# (Mono 2.10.8.1)
Score 100
Code Size 2237 Byte
Status AC
Exec Time 123 ms
Memory 7500 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 5
Set Name Test Cases
All test_aaaaaaaaaa.txt, test_myonmyon.txt, test_nemui.txt, test_onakasuita.txt, test_p.txt
Case Name Status Exec Time Memory
sample_01.txt AC 123 ms 7396 KB
sample_02.txt AC 123 ms 7500 KB
test_aaaaaaaaaa.txt AC 122 ms 7396 KB
test_myonmyon.txt AC 123 ms 7396 KB
test_nemui.txt AC 123 ms 7388 KB
test_onakasuita.txt AC 123 ms 7480 KB
test_p.txt AC 120 ms 7420 KB