Submission #1794820


Source Code Expand

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int x = scanner.nextInt(),y = scanner.nextInt(),z = scanner.nextInt();
		int count = 0;
		int sum = 0;
		for(int i=1;i<x;i++){
			sum = z * (i+1) + y * i;
			if(sum <= x){
				count = i;
			}
		}
		System.out.println(count);
	}

}

Submission Info

Submission Time
Task B - ISU
User m8618
Language Java7 (OpenJDK 1.7.0)
Score 0
Code Size 386 Byte
Status WA
Exec Time 109 ms
Memory 22868 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
AC × 5
AC × 14
WA × 3
Set Name Test Cases
Sample example_0, example_1, example_2, example_3, example_4
All example_0, example_1, example_2, example_3, example_4, rand_0, rand_1, rand_10, rand_11, rand_2, rand_3, rand_4, rand_5, rand_6, rand_7, rand_8, rand_9
Case Name Status Exec Time Memory
example_0 AC 104 ms 22612 KB
example_1 AC 94 ms 18772 KB
example_2 AC 108 ms 19156 KB
example_3 AC 108 ms 19028 KB
example_4 AC 99 ms 22740 KB
rand_0 AC 97 ms 21076 KB
rand_1 AC 108 ms 19028 KB
rand_10 AC 108 ms 19156 KB
rand_11 WA 109 ms 19156 KB
rand_2 WA 109 ms 19028 KB
rand_3 AC 98 ms 19028 KB
rand_4 AC 97 ms 17236 KB
rand_5 WA 108 ms 19156 KB
rand_6 AC 94 ms 20820 KB
rand_7 AC 108 ms 19028 KB
rand_8 AC 107 ms 22868 KB
rand_9 AC 109 ms 20948 KB