AtCoder Beginner Contest 001

Submission #3731810

Source codeソースコード

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using static System.Math;
// ReSharper disable MemberCanBeMadeStatic.Local
// ReSharper disable PossibleNullReferenceException
// ReSharper disable UnusedMember.Global
// ReSharper disable UnusedMember.Local
// ReSharper disable ArrangeTypeMemberModifiers
// ReSharper disable SuggestVarOrType_BuiltInTypes
// ReSharper disable SuggestVarOrType_Elsewhere
// ReSharper disable InvertIf
// ReSharper disable InconsistentNaming
// ReSharper disable ConvertIfStatementToSwitchStatement
// ReSharper disable UseObjectOrCollectionInitializer
#pragma warning disable

namespace AtCoder
{
    public class Program
    {
        public static void Main(string[] args)
        {
            new Program().Solve();
            Console.Read();
        }


        private void Solve()
        {
            var m = cin.Int;
            var km = m / 1000d;
            var vv = "";
            if (m < 100) vv = "0";
            if (m >= 100 && m <= 5000) vv = $"{m / 100:00}";
            if (m >= 6000 && km <= 30) vv = $"{km + 50}";
            if (km >= 35 && km <= 70) vv = $"{(km - 30) / 5 + 80}";
            if (km > 70) vv = "89";
            Console.WriteLine(vv);
        }



        /// <summary>aとbをスワップする</summary>
        void Swap(ref int a, ref int b)
        {
            var tmp = b;
            b = a;
            a = tmp;
        }

        /// <summary>aとbの最大公約数を求める</summary>
        static long Gcd(long a, long b)
        {
            while (true)
            {
                if (a < b)
                {
                    var a1 = a;
                    a = b;
                    b = a1;
                    continue;
                }

                if (b > 0)
                {
                    var a1 = a;
                    a = b;
                    b = a1 % b;
                    continue;
                }
                return a;
            }
        }

        /// <summary>aとbの最小公約数を求める</summary>
        static long Lcm(long a, long b)
        {
            return a / Gcd(a, b) * b;
        }

    }

#pragma warning disable IDE1006 // 命名スタイル
    public static class cin
#pragma warning restore IDE1006 // 命名スタイル
    {
        private const char _separator = ' ';
        private static readonly Queue<string> _input = new Queue<string>();


        public static string ReadLine => Console.ReadLine();

        public static string Str => Read;
        public static string Read
        {
            get {
                if (_input.Count != 0) return _input.Dequeue();

                // ReSharper disable once PossibleNullReferenceException
                var tmp = Console.ReadLine().Split(_separator);
                foreach (var val in tmp)
                {
                    _input.Enqueue(val);
                }

                return _input.Dequeue();
            }
        }

        public static int Int => int.Parse(Read);

        public static long Long => long.Parse(Read);

        public static double Double => double.Parse(Read);

        public static string[] StrArray(long n)
        {
            var ret = new string[n];
            for (long i = 0; i < n; ++i) ret[i] = Read;
            return ret;
        }

        public static int[] IntArray(long n)
        {
            var ret = new int[n];
            for (long i = 0; i < n; ++i) ret[i] = Int;
            return ret;
        }

        public static long[] LongArray(long n)
        {
            var ret = new long[n];
            for (long i = 0; i < n; ++i) ret[i] = Long;
            return ret;
        }

        static bool TypeEquals<T, U>() => typeof(T) == typeof(U);
        static T ChangeType<T, U>(U a) => (T)System.Convert.ChangeType(a, typeof(T));
        static T Convert<T>(string s) => TypeEquals<T, int>() ? ChangeType<T, int>(int.Parse(s))
            : TypeEquals<T, long>() ? ChangeType<T, long>(long.Parse(s))
            : TypeEquals<T, double>() ? ChangeType<T, double>(double.Parse(s))
            : TypeEquals<T, char>() ? ChangeType<T, char>(s[0])
            : ChangeType<T, string>(s);

        static void Multi<T>(out T a) => a = Convert<T>(Str);
        static void Multi<T, U>(out T a, out U b)
        {
            var ar = StrArray(2); a = Convert<T>(ar[0]); b = Convert<U>(ar[1]);
        }
        static void Multi<T, U, V>(out T a, out U b, out V c)
        {
            var ar = StrArray(3); a = Convert<T>(ar[0]); b = Convert<U>(ar[1]); c = Convert<V>(ar[2]);
        }
    }
}

Submission

Task問題 B - 視程の通報
User nameユーザ名 Kichi_128
Created time投稿日時
Language言語 C# (Mono 4.6.2.0)
Status状態 WA
Score得点 0
Source lengthソースコード長 4826 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Test case

Set

Set name Score得点 / Max score Cases
all 0 / 100 00_sample_01.txt,00_sample_02.txt,00_sample_03.txt,test_01.txt,test_02.txt,test_03.txt,test_04.txt,test_05.txt,test_06.txt,test_07.txt,test_08.txt,test_09.txt,test_10.txt,test_11.txt,test_12.txt,test_13.txt,test_14.txt,test_15.txt,test_16.txt,test_17.txt,test_18.txt,test_19.txt,test_20.txt,test_21.txt,test_22.txt,test_23.txt,test_24.txt,test_25.txt,test_26.txt,test_27.txt,test_28.txt,test_29.txt,test_30.txt,test_31.txt,test_32.txt,test_33.txt,test_34.txt,test_35.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
00_sample_01.txt AC 23 ms 9300 KB
00_sample_02.txt AC 23 ms 11220 KB
00_sample_03.txt AC 23 ms 11220 KB
test_01.txt WA
test_02.txt WA
test_03.txt AC 23 ms 9172 KB
test_04.txt AC 23 ms 9172 KB
test_05.txt AC 24 ms 13268 KB
test_06.txt AC 23 ms 11220 KB
test_07.txt AC 23 ms 11220 KB
test_08.txt AC 23 ms 9172 KB
test_09.txt AC 22 ms 9172 KB
test_10.txt AC 22 ms 11220 KB
test_11.txt WA
test_12.txt WA
test_13.txt WA
test_14.txt WA
test_15.txt WA
test_16.txt AC 23 ms 11220 KB
test_17.txt AC 23 ms 11220 KB
test_18.txt AC 23 ms 11220 KB
test_19.txt AC 23 ms 11220 KB
test_20.txt AC 23 ms 9172 KB
test_21.txt AC 24 ms 13268 KB
test_22.txt AC 24 ms 13268 KB
test_23.txt AC 23 ms 11220 KB
test_24.txt AC 22 ms 9172 KB
test_25.txt AC 23 ms 11220 KB
test_26.txt AC 23 ms 9172 KB
test_27.txt AC 23 ms 11348 KB
test_28.txt AC 23 ms 11220 KB
test_29.txt AC 24 ms 13396 KB
test_30.txt AC 23 ms 9300 KB
test_31.txt AC 23 ms 13268 KB
test_32.txt AC 22 ms 9172 KB
test_33.txt AC 22 ms 9172 KB
test_34.txt AC 22 ms 11220 KB
test_35.txt AC 22 ms 11220 KB