Submission #1351979


Source Code Expand

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int[] b = Arrays.asList(br.readLine().split(" ")).stream().mapToInt(Integer::parseInt).toArray();
        int x = b[0];
        int y = b[1];
        int z = b[2];
        for(int n=1;n<=127;n++){
            if(n%3==x && n%5==y && n%7==z){
                System.out.println(n);
            }
        }
    }
}

Submission Info

Submission Time
Task A - 孫子算経
User rickytheta
Language C++14 (GCC 5.4.1)
Score 0
Code Size 569 Byte
Status CE

Compile Error

./Main.cpp:1:1: error: ‘import’ does not name a type
 import java.io.*;
 ^
./Main.cpp:2:1: error: ‘import’ does not name a type
 import java.util.*;
 ^
./Main.cpp:4:1: error: expected unqualified-id before ‘public’
 public class Main {
 ^