Submission #322571


Source Code Expand

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
	
	
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		
		final int n = sc.nextInt();
		final int x = sc.nextInt();
		
		long sum = x * 540 + (n - x) * 525;
		
		System.out.println(sum);
	}
	
	public static class Scanner {
		private BufferedReader br;
		private StringTokenizer tok;

		public Scanner(InputStream is) throws IOException {
			br = new BufferedReader(new InputStreamReader(is));
		}

		private void getLine() throws IOException {
			while (!hasNext()) {
				tok = new StringTokenizer(br.readLine());
			}
		}

		private boolean hasNext() {
			return tok != null && tok.hasMoreTokens();
		}

		public String next() throws IOException {
			getLine();
			return tok.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public void close() throws IOException {
			br.close();
		}
	}

}

Submission Info

Submission Time
Task A - プレミアム会員
User tshirakawa
Language Java (OpenJDK 1.7.0)
Score 100
Code Size 1414 Byte
Status AC
Exec Time 464 ms
Memory 20784 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 460 ms 20784 KB
subtask0_sample_02.txt AC 458 ms 20628 KB
subtask0_sample_03.txt AC 459 ms 20620 KB
subtask0_sample_04.txt AC 456 ms 20652 KB
subtask1_random01.txt AC 457 ms 20584 KB
subtask1_random02.txt AC 450 ms 20720 KB
subtask1_random03.txt AC 457 ms 20648 KB
subtask1_random04.txt AC 454 ms 20648 KB
subtask1_random05.txt AC 457 ms 20580 KB
subtask1_random06.txt AC 460 ms 20552 KB
subtask1_random07.txt AC 456 ms 20520 KB
subtask1_random08.txt AC 463 ms 20708 KB
subtask1_random09.txt AC 449 ms 20692 KB
subtask1_random10.txt AC 454 ms 20528 KB
subtask1_random11.txt AC 457 ms 20536 KB
subtask1_random12.txt AC 458 ms 20636 KB
subtask1_random13.txt AC 453 ms 20556 KB
subtask1_random14.txt AC 462 ms 20616 KB
subtask1_random15.txt AC 450 ms 20704 KB
subtask1_random16.txt AC 464 ms 20596 KB
subtask1_random17.txt AC 463 ms 20640 KB
subtask1_random18.txt AC 462 ms 20644 KB