Next
0 / 15
Module DEMO-33-73DEMO-OOP-33

Integer Badge Parser

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create a helper class that parses one raw token as an integer. Print the value and its double, or print ERROR: INVALID INTEGER if parsing fails.

Input Format

Input is given as whitespace-separated raw tokens exactly in the order described by the problem statement.

Output Format

Print the exact success report or exact error message required by the problem.

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
12
Value: 12
Double: 24
Input: raw integer text = "12".
Derivation: value = Integer.parseInt("12") = 12 | doubleValue = 12 * 2 = 24 | "Value: 12
Double: 24" = "Value: 12
Double: 24".
Output:
Value: 12
Double: 24
Sample #2
Public sample
7
Value: 7
Double: 14
Input: raw integer text = "7".
Derivation: value = Integer.parseInt("7") = 7 | doubleValue = 7 * 2 = 14 | "Value: 7
Double: 14" = "Value: 7
Double: 14".
Output:
Value: 7
Double: 14

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings