Submission #3590804


Source Code Expand

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int Y = sc.nextInt();

		int x;
		for (int z = 0; z <= N; z++) {
			for (int y = 0; y <= N; y++) {
				x = N - y - z;
				if (x >= 0 && 10000 * x + 5000 * y + 1000 * z == Y) {
					System.out.println(x + " " + y + " " + z);
					return;
				}
			}
		}
		System.out.println("-1 -1 -1");
	}
}

Submission Info

Submission Time
Task A - Already 2018
User myamagishi
Language Java8 (OpenJDK 1.8.0)
Score 0
Code Size 468 Byte
Status RE
Exec Time 97 ms
Memory 23508 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
RE × 2
RE × 8
Set Name Test Cases
Sample a01, a02
All a01, a02, b03, b04, b05, b06, b07, b08
Case Name Status Exec Time Memory
a01 RE 95 ms 18640 KB
a02 RE 97 ms 16980 KB
b03 RE 97 ms 23508 KB
b04 RE 97 ms 21076 KB
b05 RE 97 ms 21204 KB
b06 RE 95 ms 21076 KB
b07 RE 97 ms 21460 KB
b08 RE 95 ms 21332 KB