General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
53533694 Practice:
Verdusk
231D - 25 Java 8 Accepted 278 ms 0 KB 2019-04-30 02:28:33 2019-04-30 02:28:33
 
 
→ Source
import java.util.Scanner;

public class MagicBoxSimplified 
{
	static int x1, y1, z1;
	static int xp, yp, zp;
	static int[] num = new int[6];

	public static void main(String[] args) 
	{
		Scanner sc = new Scanner(System.in);
		xp = sc.nextInt();
		yp = sc.nextInt();
		zp = sc.nextInt();
		x1 = sc.nextInt();
		y1 = sc.nextInt();
		z1 = sc.nextInt();
		
		for(int i = 0; i < 6; i++)
		{
			num[i] = sc.nextInt();
		}
		
		int sum = 0;
		
		if(xp < 0)sum += num[4];
		else if(xp > x1)sum += num[5];
		
		if(yp < 0)sum += num[0];
		else if(yp > y1)sum += num[1];
		
		if(zp < 0)sum += num[2];
		else if(zp > z1)sum += num[3];
		
		System.out.println(sum);
	}

}
 
 
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details