Submission #322555


Source Code Expand

using System;
using System.IO;
using System.Text;
using System.Linq;
using System.Diagnostics;
using System.Collections.Generic;
using Enu = System.Linq.Enumerable;

class Program
{
    void Solve()
    {
        int N = reader.Int(), X = reader.Int();
        Console.WriteLine(540 * X + 525 * (N - X));
    }




    static void Main() { new Program().Solve(); }
    Reader reader = new Reader(Console.In);
    class Reader
    {
        private readonly TextReader reader;
        private readonly char[] separator = { ' ' };
        private readonly StringSplitOptions removeOp = StringSplitOptions.RemoveEmptyEntries;
        private string[] A = new string[0];
        private int i;

        public Reader(TextReader r) { reader = r; }
        public bool HasNext() { return Enqueue(); }
        public string String() { return Dequeue(); }
        public int Int() { return int.Parse(Dequeue()); }
        public long Long() { return long.Parse(Dequeue()); }
        public double Double() { return double.Parse(Dequeue()); }
        public int[] IntLine() { var s = Line(); return s == "" ? new int[0] : Array.ConvertAll(Split(s), int.Parse); }
        public int[] IntArray(int N) { return Enumerable.Range(0, N).Select(i => Int()).ToArray(); }
        public int[][] IntGrid(int H) { return Enumerable.Range(0, H).Select(i => IntLine()).ToArray(); }
        public string[] StringArray(int N) { return Enumerable.Range(0, N).Select(i => Line()).ToArray(); }
        public string Line() { return reader.ReadLine().Trim(); }
        private string[] Split(string s) { return s.Split(separator, removeOp); }
        private bool Enqueue()
        {
            if (i < A.Length) return true;
            string line = reader.ReadLine();
            if (line == null) return false;
            if (line == "") return Enqueue();
            A = Split(line);
            i = 0;
            return true;
        }
        private string Dequeue() { Enqueue(); return A[i++]; }
    }
}

Submission Info

Submission Time
Task A - プレミアム会員
User eitaho
Language C# (Mono 2.10.8.1)
Score 100
Code Size 2042 Byte
Status AC
Exec Time 158 ms
Memory 7840 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 4
AC × 22
Set Name Test Cases
Sample subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt, subtask0_sample_04.txt
All subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt, subtask0_sample_04.txt, subtask1_random01.txt, subtask1_random02.txt, subtask1_random03.txt, subtask1_random04.txt, subtask1_random05.txt, subtask1_random06.txt, subtask1_random07.txt, subtask1_random08.txt, subtask1_random09.txt, subtask1_random10.txt, subtask1_random11.txt, subtask1_random12.txt, subtask1_random13.txt, subtask1_random14.txt, subtask1_random15.txt, subtask1_random16.txt, subtask1_random17.txt, subtask1_random18.txt
Case Name Status Exec Time Memory
subtask0_sample_01.txt AC 152 ms 7800 KB
subtask0_sample_02.txt AC 147 ms 7776 KB
subtask0_sample_03.txt AC 152 ms 7796 KB
subtask0_sample_04.txt AC 151 ms 7732 KB
subtask1_random01.txt AC 147 ms 7780 KB
subtask1_random02.txt AC 150 ms 7732 KB
subtask1_random03.txt AC 150 ms 7728 KB
subtask1_random04.txt AC 151 ms 7840 KB
subtask1_random05.txt AC 157 ms 7784 KB
subtask1_random06.txt AC 151 ms 7728 KB
subtask1_random07.txt AC 153 ms 7788 KB
subtask1_random08.txt AC 155 ms 7692 KB
subtask1_random09.txt AC 158 ms 7716 KB
subtask1_random10.txt AC 150 ms 7780 KB
subtask1_random11.txt AC 153 ms 7732 KB
subtask1_random12.txt AC 155 ms 7720 KB
subtask1_random13.txt AC 147 ms 7732 KB
subtask1_random14.txt AC 155 ms 7704 KB
subtask1_random15.txt AC 152 ms 7732 KB
subtask1_random16.txt AC 154 ms 7656 KB
subtask1_random17.txt AC 150 ms 7780 KB
subtask1_random18.txt AC 152 ms 7728 KB