Submission #41350087


Source Code Expand

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			int from = scanner.nextInt();
			n--;
			System.out.print(from);
			for (int i=0;i<n;i++) {
				int to = scanner.nextInt();
				while (from != to) {
					if (from > to)
						from--;
					else
						from++;
					System.out.print(" "+from);
				}
			}
			System.out.println();
		}
	}

}

Submission Info

Submission Time
Task B - Fill the Gaps
User mkm75
Language Java (OpenJDK 11.0.6)
Score 200
Code Size 483 Byte
Status AC
Exec Time 230 ms
Memory 40540 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 10
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
random_01.txt AC 185 ms 39148 KiB
random_02.txt AC 156 ms 38672 KiB
random_03.txt AC 183 ms 39096 KiB
random_04.txt AC 169 ms 39032 KiB
random_05.txt AC 171 ms 39008 KiB
random_06.txt AC 230 ms 40540 KiB
random_07.txt AC 132 ms 38364 KiB
random_08.txt AC 123 ms 38252 KiB
sample_01.txt AC 128 ms 38524 KiB
sample_02.txt AC 128 ms 38232 KiB