Submission #1167310


Source Code Expand

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            while (true)
                solve(in);
        }
    }

    private static void solve(Scanner in) {
        int x = in.nextInt();
        int y = 0;
        for (int i = 0; i <= x; i++) {
            y += i;
            if (y >= x) {
                System.out.println(i);
                break;
            }
        }
    }
}

Submission Info

Submission Time
Task C - Go Home
User oduk
Language Java8 (OpenJDK 1.8.0)
Score 0
Code Size 505 Byte
Status RE
Exec Time 104 ms
Memory 23764 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
RE × 3
RE × 18
Set Name Test Cases
Sample 0_000.txt, 0_001.txt, 0_002.txt
All 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt, 1_012.txt, 1_013.txt, 1_014.txt, 1_015.txt, 1_016.txt, 1_017.txt
Case Name Status Exec Time Memory
0_000.txt RE 104 ms 21840 KB
0_001.txt RE 97 ms 21972 KB
0_002.txt RE 93 ms 19924 KB
1_003.txt RE 95 ms 21844 KB
1_004.txt RE 96 ms 21716 KB
1_005.txt RE 96 ms 21204 KB
1_006.txt RE 94 ms 20560 KB
1_007.txt RE 93 ms 18900 KB
1_008.txt RE 97 ms 19796 KB
1_009.txt RE 95 ms 19924 KB
1_010.txt RE 95 ms 17748 KB
1_011.txt RE 99 ms 19156 KB
1_012.txt RE 97 ms 23764 KB
1_013.txt RE 94 ms 21716 KB
1_014.txt RE 93 ms 18764 KB
1_015.txt RE 95 ms 23764 KB
1_016.txt RE 96 ms 21844 KB
1_017.txt RE 93 ms 19924 KB