criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<bits/stdc++.h>
using namespace std;

int n;
double x[100],y[100];

double distance(double p){
double sum=0;
for(int i=0;i<n;i++){
double w=abs(x[i]-y[i]);
sum+=pow(w,p);
}
return pow(sum,1/p);
}

int main(){
cout<<fixed<<setprecision(12);
cin>>n;
for(int i=0;i<n;i++){
cin>>x[i];
}
for(int i=0;i<n;i++){
cin>>y[i];
}
cout<<distance(1)<<endl;
cout<<distance(2)<<endl;
cout<<distance(3)<<endl;

double mx=0;
for(int i=0;i<n;i++){
mx=max(mx,abs(x[i]-y[i]);
}
cout<<mx;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:25: error: expected ')' before ';' token
   31 | mx=max(mx,abs(x[i]-y[i]);
      |       ~                 ^
      |                         )
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n;
double s[100],y[100];
double distance(double p){
    double sum=0;
    for(int i=0;i<n;i++){
        double w=abs(x[i]-y[i]);
        sum+=pow(w,p);
    }
    return pow(sum,1.0/p);
}

int main(){
    cout<<fixed<<setprecision(12);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>x[i];
    }
    for(int i=0;i<n;i++){
        cin>>y[i];
    }
    cout<<distance(1)<<endl;
    cout<<distance(2)<<endl;
    cout<<distance(3)<<endl;
    double mx=0;
    for(int i=0;i<n;i++){
        mx=max(mx,abs(x[i]-y[i]));
        
    }
    cout<<mx<<endl;
    return 0;
    
}


Compiler output:
a.cc: In function 'double distance(double)':
a.cc:8:22: error: 'x' was not declared in this scope
    8 |         double w=abs(x[i]-y[i]);
      |                      ^
a.cc: In function 'int main()':
a.cc:18:14: error: 'x' was not declared in this scope
   18 |         cin>>x[i];
      |              ^
a.cc:28:23: error: 'x' was not declared in this scope
   28 |         mx=max(mx,abs(x[i]-y[i]));
      |                       ^
Language: C++

#include <math.h>
#include <cmath>
using namespace std;

double x[100], y[100];

int main()
{
	int n;
	double x[100] = { 0 }, y[100] = { 0 }, p_1 = 0, p_2 = 0, p_3 = 0, p_infinity = -1;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) scanf("%lf", &x[i]);
	for (int i = 0; i < n; i++) scanf("%lf", &y[i]);

	for (int i = 0; i < n; i++) {
		p_1 += abs(x[i] - y[i]);
		p_2 += pow(abs(x[i] - y[i]), 2.0);
		p_3 += abs((x[i] - y[i])*(x[i] - y[i])*(x[i] - y[i]));
		p_infinity += (p_infinity >= abs(x[i] - y[i])) ? p_infinity : abs(x[i] - y[i]);
	}
	printf("%.6lf\n",p_1);
	printf("%.6lf\n",sqrt(p_2));
	printf("%.6lf\n", cbrt(p_3));
	printf("%.6lf\n", p_infinity);
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'scanf' was not declared in this scope
   11 |         scanf("%d", &n);
      |         ^~~~~
a.cc:21:9: error: 'printf' was not declared in this scope
   21 |         printf("%.6lf\n",p_1);
      |         ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include <cmath>
  +++ |+#include <cstdio>
    3 | using namespace std;
Language: C++

#include <math.h>
#include <cmath>
using namespace std;

int main()
{
	int n;
	double x[100] = { 0 }, y[100] = { 0 }, p_1 = 0, p_2 = 0, p_3 = 0, p_infinity = -1;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) scanf("%lf", &x[i]);
	for (int i = 0; i < n; i++) scanf("%lf", &y[i]);

	for (int i = 0; i < n; i++) {
		p_1 += abs(x[i] - y[i]);
		p_2 += pow(abs(x[i] - y[i]), 2.0);
		p_3 += abs((x[i] - y[i])*(x[i] - y[i])*(x[i] - y[i]));
		p_infinity += (p_infinity >= abs(x[i] - y[i])) ? p_infinity : abs(x[i] - y[i]);
	}
	printf("%.6lf\n",p_1);
	printf("%.6lf\n",sqrt(p_2));
	printf("%.6f\n", cbrt(p_3));
	printf("%.6lf\n", p_infinity);
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'scanf' was not declared in this scope
    9 |         scanf("%d", &n);
      |         ^~~~~
a.cc:19:9: error: 'printf' was not declared in this scope
   19 |         printf("%.6lf\n",p_1);
      |         ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include <cmath>
  +++ |+#include <cstdio>
    3 | using namespace std;
Language: C++

#include<stdio.h>
#include<iostream>
#include<string>
#include<math.h>

using namespace std;


void jigen(int* a, int* b, int size,int power) {
	double result = 0;
	for (int i = 0; i < size; i++) {
		result += pow(abs(a[i] - b[i]),power);
	}
	result = pow(result, 1.0 / power);

	printf("%.7lf\n", result);
	return;
}



int main(){

	int size;
	cin >> size;

	int a[100];
	int b[100];

	for (int i = 0; i < size; i++) {
		cin >> a[i];
	}
	for (int i = 0; i < size; i++) {
		cin >> b[i];
	}

	jigen(a, b, size, 1);
	jigen(a, b, size, 2);
	jigen(a, b, size, 3);

	int max = 0;
	for (int i = 0; i < size; i++) {
		if (max < abs(a[i] - b[i]))max = abs(a[i]] - b[i]);
	}
	printf("%.7lf\n", max);



	//system("pause");
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:43:58: error: expected ')' before ']' token
   43 |                 if (max < abs(a[i] - b[i]))max = abs(a[i]] - b[i]);
      |                                                     ~    ^
      |                                                          )
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>

int main(){
 int n, x[100], y[100];
 cin>>n;
 for(int i=0; i<n; i++)cin >> x[i];
 for(int i=0; i<n; i++)cin >> y[i];
 double d[4];
 for(int i=0; i<4; i++) d[i]=0.0;
 for(int p=1; p<=3; p++){
  for(int i=0; i<n; i++){
   d[p]+=pow(fabs(x[i]-y[i]),p);
  }
  d[p]=pow(d[p], 1.0/p);
 }
 for(int i=0; i<n; i++){
  d[0]=(d[0] < fabs(x[i]-y[i])? fabs(x[i]-y[i]):d[0]);
 }
 printf("%lf\n", d[1]);
 printf("%lf\n", d[2]);
 printf("%lf\n", d[3]);
 printf("%lf\n", d[0]);
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |  cin>>n;
      |  ^~~
      |  std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>

int main(){
 int n, x[100], y[100];
 cin>>n;
 for(int i=0; i<n; i++)cin >> x[i];
 for(int i=0; i<n; i++)cin >> y[i];
 double d[4];
 for(int i=0; i<4; i++) d[i]=0.0;
 for(int p=1; p<=3; p++){
  for(int i=0; i<n; i++){
   d[p]+=pow(fabs(x[i]-y[i]),p);
  }
  d[p]=pow(d[p], 1.0/p);
 }
 for(int i=0; i<n; i++){
  d[0]=(d[0] < fabs(x[i]-y[i])?fabs(x[i]-y[i]):d[0]);
 }
 printf("%lf\n", d[1]);
 printf("%lf\n", d[2]);
 printf("%lf\n", d[3]);
 printf("%lf\n", d[0]);
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |  cin>>n;
      |  ^~~
      |  std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: Java

import java.util.Scanner;

public class Dice {
    public static void main(String[] args) {
        Scanner f = new Scanner(System.in);
        // fill in the dictionary with the initial value
        int[] values = new int[6];
        for(int i = 0; i < 6; i++){
            values[i] = f.nextInt();
        }
        Dice dice = new Dice(values);
        String movements = f.nextLine();
        String movements2 = f.nextLine();
        char[] s = movements2.toCharArray();
        for(char direction : s){
            dice.roll(direction);
        }
        System.out.println(dice.getTop());
    }
}
class Dice {
    int one;
    int two;
    int three;
    int four;
    int five;
    int six;
    public Dice(int[] values){
        this.one = values[0];
        this.two = values[1];
        this.three = values[2];
        this.four = values[3];
        this.five = values[4];
        this.six = values[5];
    }

    public void roll(char s){
        switch (s){
            case 'E': this.east(); break;
            case 'W': this.west(); break;
            case 'S': this.south(); break;
            case 'N': this.north(); break;
        }
    }

    public void east(){
        int temp = this.six;
        this.six = this.three;
        this.three = this.one;
        int temp2 = this.four;
        this.four = temp;
        this.one = temp2;
    }

    public void west(){
        int temp = this.six;
        this.six = this.four;
        this.four = this.one;
        int temp2 = this.three;
        this.three = temp;
        this.one = temp2;
    }

    public void south(){
        int temp = this.two;
        this.two = this.one;
        this.one = this.five;
        int temp2 = this.six;
        this.six = temp;
        this.one = temp2;
    }

    public void north(){
        int temp = this.two;
        this.two = this.six;
        this.six = this.five;
        int temp2 = this.one;
        this.one = temp;
        this.five = temp2;
    }

    public int getTop(){
        return this.one;
    }
}


Compiler output:
Main.java:3: error: class Dice is public, should be declared in a file named Dice.java
public class Dice {
       ^
Main.java:21: error: duplicate class: Dice
class Dice {
^
Main.java:11: error: constructor Dice in class Dice cannot be applied to given types;
        Dice dice = new Dice(values);
                    ^
  required: no arguments
  found:    int[]
  reason: actual and formal argument lists differ in length
Main.java:16: error: cannot find symbol
            dice.roll(direction);
                ^
  symbol:   method roll(char)
  location: variable dice of type Dice
Main.java:18: error: cannot find symbol
        System.out.println(dice.getTop());
                               ^
  symbol:   method getTop()
  location: variable dice of type Dice
5 errors
Language: Java

import java.util.Scanner;

public class Dice {
        public static void main(String[] args) {
        Scanner f = new Scanner(System.in);
        // fill in the dictionary with the initial value
        int[] values = new int[6];
        for(int i = 0; i < 6; i++){
            values[i] = f.nextInt();
        }
        Dice dice = new Dice(values);
        String movements = f.nextLine();
        String movements2 = f.nextLine();
        char[] s = movements2.toCharArray();
        for(char direction : s){
            dice.roll(direction);
        }
        System.out.println(dice.getTop());
    }
    static class Dice {
        int one;
        int two;
        int three;
        int four;
        int five;
        int six;
        public Dice(int[] values){
            this.one = values[0];
            this.two = values[1];
            this.three = values[2];
            this.four = values[3];
            this.five = values[4];
            this.six = values[5];
        }

        public void roll(char s){
            switch (s){
                case 'E': this.east(); break;
                case 'W': this.west(); break;
                case 'S': this.south(); break;
                case 'N': this.north(); break;
            }
        }

        public void east(){
            int temp = this.six;
            this.six = this.three;
            this.three = this.one;
            int temp2 = this.four;
            this.four = temp;
            this.one = temp2;
        }

        public void west(){
            int temp = this.six;
            this.six = this.four;
            this.four = this.one;
            int temp2 = this.three;
            this.three = temp;
            this.one = temp2;
        }

        public void south(){
            int temp = this.two;
            this.two = this.one;
            this.one = this.five;
            int temp2 = this.six;
            this.six = temp;
            this.one = temp2;
        }

        public void north(){
            int temp = this.two;
            this.two = this.six;
            this.six = this.five;
            int temp2 = this.one;
            this.one = temp;
            this.five = temp2;
        }

        public int getTop(){
            return this.one;
        }
    }
}


Compiler output:
Main.java:3: error: class Dice is public, should be declared in a file named Dice.java
public class Dice {
       ^
Main.java:20: error: class Dice is already defined in package unnamed package
    static class Dice {
           ^
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

class Main {
	public static void main(String[] args) throws IOException {
     BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	
	
		//BufferedReader br=new BufferedReader(new FileReader("sample.txt"));
		String str=br.readLine();
		String[] st=str.split(" ");
		str=br.readLine();
		Dice dice1 =new Dice(st);
		dice1.roll(str);
		System.out.println(dice1.getd1());
	}
	}
class Dice{

String top,front,right,left,back,bot;

	Dice(String[] s){
		top=s[0];
		front=s[1];
		right=s[2];
		left=s[3];
		back=s[4];
		bot=s[5];
	}
		
	void roll(String s){
		String top,bot,back,front,left,right;
		for(int i=0;i<s.length();i++){
			char c=s.charAt(i);
		top=this.top;
		bot=this.bot;
		front=this.front;
		back=this.back;
		left=this.left;
		right=this.right;
		
		switch(c){
		case 'N':
			top=this.front;
			bot=this.back;
			front=this.bot;
			back=this.top;
			break;
		
		case 'S':
			top=this.back;
			bot=this.front;
			front=this.top;
			back=this.bot;
			break;
		case 'W':
			top=this.right;
			bot=this.left;
			right=this.bot;
			left=this.top;break;
		
		case 'E':
			top=this.left;
			bot=this.right;
			right=this.top;
			left=this.bot;
			break;
		}
		this.top=top;
		this.front=front;
		this.right=right;
		this.left=left;
		this.back=back;
		this.bot=bot;
		
	}}
	String getd1(){return this.top;}

Compiler output:
Main.java:80: error: reached end of file while parsing
	String getd1(){return this.top;}
	                                ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

class Main {
	public static void main(String[] args) throws IOException {
     BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	
	
		//BufferedReader br=new BufferedReader(new FileReader("sample.txt"));
		String str=br.readLine();
		String[] st=str.split(" ");
		str=br.readLine();
		Dice dice1 =new Dice(st);
		dice1.roll(str);
		System.out.println(dice1.getd1());
	}
	}
class Dice{

String top,front,right,left,back,bot;

	Dice(String[] s){
		top=s[0];
		front=s[1];
		right=s[2];
		left=s[3];
		back=s[4];
		bot=s[5];
	}
		
	void roll(String s){
		String top,bot,back,front,left,right;
		for(int i=0;i<s.length();i++){
			char c=s.charAt(i);
		
		front=this.front;
		back=this.back;
		left=this.left;
		right=this.right;
		
		switch(c){
		case 'N':
			top=this.front;
			bot=this.back;
			front=this.bot;
			back=this.top;
			break;
		
		case 'S':
			top=this.back;
			bot=this.front;
			front=this.top;
			back=this.bot;
			break;
		case 'W':
			top=this.right;
			bot=this.left;
			right=this.bot;
			left=this.top;break;
		
		case 'E':
			top=this.left;
			bot=this.right;
			right=this.top;
			left=this.bot;
			break;
		}
		this.top=top;
		this.front=front;
		this.right=right;
		this.left=left;
		this.back=back;
		this.bot=bot;
		
	}}
	String getd1(){return this.top;}}

Compiler output:
Main.java:71: error: variable top might not have been initialized
		this.top=top;
		         ^
Main.java:76: error: variable bot might not have been initialized
		this.bot=bot;
		         ^
2 errors
Language: Java

import java.io.*;

class Main{
	public static void main(String args[])throws IOException{
		BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
		String[] str = buf.readLine().split(" ");
		String direction = buf.readLine();
		int[] num = new int[6];

		for(int i=0; i<6; i++){
			num[i] = Integer.parseInt(str[i]);
		}
		DiceI sk = new DiceI(num,direction);
		System.out.println(sk.getSide());
	}	
}
class DiceI{
	char c;
	int tmp;
	int value=0;

	public Saikoro(int[] num, String direction){
		for(int i=0; i<direction.length(); i++){
			c = direction.charAt(i);
			switch (c) {
	        case 'N':
	            tmp = num[0];
	            num[0] = num[1];
	            num[1] = num[5];
	            num[5] = num[4];
	            num[4] = tmp;
	            
	            break;
	        case 'W':
	        	tmp = num[0];
	            num[0] = num[2];
	            num[2] = num[5];
	            num[5] = num[3];
	            num[3] = tmp;         
	            break;
	        case 'E':
	        	tmp = num[0];
	            num[0] = num[3];
	            num[3] = num[5];
	            num[5] = num[2];
	            num[2] = tmp;
	            break;
	        case 'S':
	        	tmp = num[0];
	            num[0] = num[4];
	            num[4] = num[5];
	            num[5] = num[1];
	            num[1] = tmp;
	            break;
	        default:
			}
			value = num[0];
		}
	}
	public int getSide(){
		return value;
	}

}

Compiler output:
Main.java:22: error: invalid method declaration; return type required
	public Saikoro(int[] num, String direction){
	       ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
	Dice dice;
	void run(){
		Scanner s = new Scanner(System.in);
		int[] num = new int[6];
		for(int i = 0;i < num.length;i++){
			num[i] = s.nextInt();
		}
		dice = new Dice(num);
		String str = s.next();
		for(int i = 0;i < str.length();i++){
			dice.label = dice.roll(str.substring(i,i+1));
		}
		dice.printTop();
	}
	public static void main(String args[]){
		new Main().run();
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
	Dice dice;
	^
  symbol:   class Dice
  location: class Main
Main.java:11: error: cannot find symbol
		dice = new Dice(num);
		           ^
  symbol:   class Dice
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class Main {
	Dice dice;
	void run(){
		Scanner s = new Scanner(System.in);
		int[] num = new int[6];
		for(int i = 0;i < num.length;i++){
			num[i] = s.nextInt();
		}
		dice = new Dice(num);
		String str = s.next();
		for(int i = 0;i < str.length();i++){
			dice.label = dice.roll(str.substring(i,i+1));
		}
		dice.printTop();
	}
	public static void main(String args[]){
		new Main().run();
	}
}

public class Dice {
	static final int labelNum = 6;
	int[] label;
	Dice(int[] num){
		label = new int[labelNum];
		for(int i = 0;i < labelNum;i++)
			label[i] = num[i];
	}
	
	int[] roll(String pro){
		int[] dice = new int[labelNum];
		switch(pro.hashCode()){
			case 69://E->3
				dice[0] = this.label[3];
				dice[1] = this.label[1];
				dice[2] = this.label[0];
				dice[3] = this.label[5];
				dice[4] = this.label[4];
				dice[5] = this.label[2];
				break;
			case 78://N->5
				dice[0] = this.label[1];
				dice[1] = this.label[5];
				dice[2] = this.label[2];
				dice[3] = this.label[3];
				dice[4] = this.label[0];
				dice[5] = this.label[4];
				break;
			case 83://S->2
				dice[0] = this.label[4];
				dice[1] = this.label[0];
				dice[2] = this.label[2];
				dice[3] = this.label[3];
				dice[4] = this.label[5];
				dice[5] = this.label[1];
				break;
			case 87://W->4
				dice[0] = this.label[2];
				dice[1] = this.label[1];
				dice[2] = this.label[5];
				dice[3] = this.label[0];
				dice[4] = this.label[4];
				dice[5] = this.label[3];
				break;
			default:
				break;
		}
		return dice;
	}
	
	void print(){
		for(int i = 0;i<this.label.length;i++){
			System.out.println(this.label[i]);
		}
	}
	void printTop(){
		System.out.println(this.label[0]);
	}
}

Compiler output:
Main.java:23: error: class Dice is public, should be declared in a file named Dice.java
public class Dice {
       ^
1 error
Language: Java

import java.util.Map;
import java.util.Scanner;

import d.Dice;

public class Main {
	public static void main(String[] args){

	Scanner scan = new Scanner(System.in);
	Dice dice = new Dice(scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt());

		String str = scan.next();
		for(int i=0;i<str.length();i++){
			dice.rollDice(String.valueOf(str.charAt(i)));
		}

		Map<String,Integer> dicenum =dice.getDice();
		
		System.out.println(dicenum.get("top"));
		

	}
}


package d;

import java.util.HashMap;
import java.util.Map;

public class Dice {
	private int top;
	private int front;
	private int right;
	private int left;
	private int back;
	private int bottom;

	public Dice() {
		// TODO ?????????????????????????????????????????????????????????
	}

	public Dice(int top, int front, int right, int left, int back, int bottom) {
		this.top = top;
		this.front = front;
		this.right = right;
		this.left = left;
		this.back = back;
		this.bottom = bottom;
	}

	public void setDice(int top, int front, int right, int left, int back, int bottom) {
		this.top = top;
		this.front = front;
		this.right = right;
		this.left = left;
		this.back = back;
		this.bottom = bottom;
	}

	public void rollDice(String str){
		if(str.equals("N"))rollNorth();
		if(str.equals("S"))rollSouth();
		if(str.equals("E"))rollEast();
		if(str.equals("W"))rollWest();
	}

	public void rollNorth(){
		setDice(front,bottom,right,left,top,back);
	}

	public void rollSouth(){
		setDice(back,top,right,left,bottom,front);
	}

	public void rollEast(){
		setDice(left,front,top,bottom,back,right);
	}

	public void rollWest(){
		setDice(right,front,bottom,top,back,left);
	}

	public Map<String,Integer> getDice(){
		Map<String,Integer> dice = new HashMap<String,Integer>();
		dice.put("top", top);
		dice.put("front", front);
		dice.put("right", right);
		dice.put("left", left);
		dice.put("back", back);
		dice.put("bottom", bottom);
		return dice;
	}


	public int getTop() {
		return top;
	}


	public void setTop(int top) {
		this.top = top;
	}
	public int getBottom() {
		return bottom;
	}
	public void setBottom(int bottom) {
		this.bottom = bottom;
	}
	public int getFront() {
		return front;
	}
	public void setFront(int front) {
		this.front = front;
	}
	public int getBack() {
		return back;
	}
	public void setBack(int back) {
		this.back = back;
	}
	public int getRight() {
		return right;
	}
	public void setRight(int right) {
		this.right = right;
	}
	public int getLeft() {
		return left;
	}
	public void setLeft(int left) {
		this.left = left;
	}


}

Compiler output:
Main.java:26: error: class, interface, enum, or record expected
package d;
^
Main.java:28: error: class, interface, enum, or record expected
import java.util.HashMap;
^
Main.java:29: error: class, interface, enum, or record expected
import java.util.Map;
^
3 errors
Language: Java

package d;

import java.util.HashMap;
import java.util.Map;

public class Dice {
	private int top;
	private int front;
	private int right;
	private int left;
	private int back;
	private int bottom;

	public Dice() {
		// TODO ?????????????????????????????????????????????????????????
	}

	public Dice(int top, int front, int right, int left, int back, int bottom) {
		this.top = top;
		this.front = front;
		this.right = right;
		this.left = left;
		this.back = back;
		this.bottom = bottom;
	}

	public void setDice(int top, int front, int right, int left, int back, int bottom) {
		this.top = top;
		this.front = front;
		this.right = right;
		this.left = left;
		this.back = back;
		this.bottom = bottom;
	}

	public void rollDice(String str){
		if(str.equals("N"))rollNorth();
		if(str.equals("S"))rollSouth();
		if(str.equals("E"))rollEast();
		if(str.equals("W"))rollWest();
	}

	public void rollNorth(){
		setDice(front,bottom,right,left,top,back);
	}

	public void rollSouth(){
		setDice(back,top,right,left,bottom,front);
	}

	public void rollEast(){
		setDice(left,front,top,bottom,back,right);
	}

	public void rollWest(){
		setDice(right,front,bottom,top,back,left);
	}

	public Map<String,Integer> getDice(){
		Map<String,Integer> dice = new HashMap<String,Integer>();
		dice.put("top", top);
		dice.put("front", front);
		dice.put("right", right);
		dice.put("left", left);
		dice.put("back", back);
		dice.put("bottom", bottom);
		return dice;
	}


	public int getTop() {
		return top;
	}


	public void setTop(int top) {
		this.top = top;
	}
	public int getBottom() {
		return bottom;
	}
	public void setBottom(int bottom) {
		this.bottom = bottom;
	}
	public int getFront() {
		return front;
	}
	public void setFront(int front) {
		this.front = front;
	}
	public int getBack() {
		return back;
	}
	public void setBack(int back) {
		this.back = back;
	}
	public int getRight() {
		return right;
	}
	public void setRight(int right) {
		this.right = right;
	}
	public int getLeft() {
		return left;
	}
	public void setLeft(int left) {
		this.left = left;
	}


}


import java.util.Map;
import java.util.Scanner;

import d.Dice;

public class Main {
	public static void main(String[] args){

	Scanner scan = new Scanner(System.in);
	Dice dice = new Dice(scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt());

		String str = scan.next();
		for(int i=0;i<str.length();i++){
			dice.rollDice(String.valueOf(str.charAt(i)));
		}

		Map<String,Integer> dicenum =dice.getDice();
		
		System.out.println(dicenum.get("top"));
		

	}
}

Compiler output:
Main.java:114: error: class, interface, enum, or record expected
import java.util.Map;
^
Main.java:115: error: class, interface, enum, or record expected
import java.util.Scanner;
^
Main.java:117: error: class, interface, enum, or record expected
import d.Dice;
^
3 errors
Language: Java

import java.util.Map;
import java.util.Scanner;

import d.Dice;

public class Main {
	public static void main(String[] args){

	Scanner scan = new Scanner(System.in);
	Dice dice = new Dice(scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt());

		String str = scan.next();
		for(int i=0;i<str.length();i++){
			dice.rollDice(String.valueOf(str.charAt(i)));
		}

		Map<String,Integer> dicenum =dice.getDice();
		
		System.out.println(dicenum.get("top"));
		

	}
}

Compiler output:
Main.java:4: error: package d does not exist
import d.Dice;
        ^
Main.java:10: error: cannot find symbol
	Dice dice = new Dice(scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt());
	^
  symbol:   class Dice
  location: class Main
Main.java:10: error: cannot find symbol
	Dice dice = new Dice(scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt());
	                ^
  symbol:   class Dice
  location: class Main
3 errors
Language: Java

package d;

import java.util.HashMap;
import java.util.Map;

public class Dice {
	private int top;
	private int front;
	private int right;
	private int left;
	private int back;
	private int bottom;

	public Dice() {
		// TODO ?????????????????????????????????????????????????????????
	}

	public Dice(int top, int front, int right, int left, int back, int bottom) {
		this.top = top;
		this.front = front;
		this.right = right;
		this.left = left;
		this.back = back;
		this.bottom = bottom;
	}

	public void setDice(int top, int front, int right, int left, int back, int bottom) {
		this.top = top;
		this.front = front;
		this.right = right;
		this.left = left;
		this.back = back;
		this.bottom = bottom;
	}

	public void rollDice(String str){
		if(str.equals("N"))rollNorth();
		if(str.equals("S"))rollSouth();
		if(str.equals("E"))rollEast();
		if(str.equals("W"))rollWest();
	}

	public void rollNorth(){
		setDice(front,bottom,right,left,top,back);
	}

	public void rollSouth(){
		setDice(back,top,right,left,bottom,front);
	}

	public void rollEast(){
		setDice(left,front,top,bottom,back,right);
	}

	public void rollWest(){
		setDice(right,front,bottom,top,back,left);
	}

	public Map<String,Integer> getDice(){
		Map<String,Integer> dice = new HashMap<String,Integer>();
		dice.put("top", top);
		dice.put("front", front);
		dice.put("right", right);
		dice.put("left", left);
		dice.put("back", back);
		dice.put("bottom", bottom);
		return dice;
	}


	public int getTop() {
		return top;
	}


	public void setTop(int top) {
		this.top = top;
	}
	public int getBottom() {
		return bottom;
	}
	public void setBottom(int bottom) {
		this.bottom = bottom;
	}
	public int getFront() {
		return front;
	}
	public void setFront(int front) {
		this.front = front;
	}
	public int getBack() {
		return back;
	}
	public void setBack(int back) {
		this.back = back;
	}
	public int getRight() {
		return right;
	}
	public void setRight(int right) {
		this.right = right;
	}
	public int getLeft() {
		return left;
	}
	public void setLeft(int left) {
		this.left = left;
	}


}



import java.util.Map;
import java.util.Scanner;

import d.Dice;

public class Main {
	public static void main(String[] args){

	Scanner scan = new Scanner(System.in);
	Dice dice = new Dice(scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt());

		String str = scan.next();
		for(int i=0;i<str.length();i++){
			dice.rollDice(String.valueOf(str.charAt(i)));
		}

		Map<String,Integer> dicenum =dice.getDice();
		
		System.out.println(dicenum.get("top"));
		

	}
}

Compiler output:
Main.java:115: error: class, interface, enum, or record expected
import java.util.Map;
^
Main.java:116: error: class, interface, enum, or record expected
import java.util.Scanner;
^
Main.java:118: error: class, interface, enum, or record expected
import d.Dice;
^
3 errors
Language: Java

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;


public class Dice {
	private int top;
	private int front;
	private int right;
	private int left;
	private int back;
	private int bottom;

	public Dice() {
		// TODO ?????????????????????????????????????????????????????????
	}

	public Dice(int top, int front, int right, int left, int back, int bottom) {
		this.top = top;
		this.front = front;
		this.right = right;
		this.left = left;
		this.back = back;
		this.bottom = bottom;
	}

	public void setDice(int top, int front, int right, int left, int back, int bottom) {
		this.top = top;
		this.front = front;
		this.right = right;
		this.left = left;
		this.back = back;
		this.bottom = bottom;
	}

	public void rollDice(String str){
		if(str.equals("N"))rollNorth();
		if(str.equals("S"))rollSouth();
		if(str.equals("E"))rollEast();
		if(str.equals("W"))rollWest();
	}

	public void rollNorth(){
		setDice(front,bottom,right,left,top,back);
	}

	public void rollSouth(){
		setDice(back,top,right,left,bottom,front);
	}

	public void rollEast(){
		setDice(left,front,top,bottom,back,right);
	}

	public void rollWest(){
		setDice(right,front,bottom,top,back,left);
	}

	public Map<String,Integer> getDice(){
		Map<String,Integer> dice = new HashMap<String,Integer>();
		dice.put("top", top);
		dice.put("front", front);
		dice.put("right", right);
		dice.put("left", left);
		dice.put("back", back);
		dice.put("bottom", bottom);
		return dice;
	}


	public int getTop() {
		return top;
	}


	public void setTop(int top) {
		this.top = top;
	}
	public int getBottom() {
		return bottom;
	}
	public void setBottom(int bottom) {
		this.bottom = bottom;
	}
	public int getFront() {
		return front;
	}
	public void setFront(int front) {
		this.front = front;
	}
	public int getBack() {
		return back;
	}
	public void setBack(int back) {
		this.back = back;
	}
	public int getRight() {
		return right;
	}
	public void setRight(int right) {
		this.right = right;
	}
	public int getLeft() {
		return left;
	}
	public void setLeft(int left) {
		this.left = left;
	}


}

public class Main {
	public static void main(String[] args){

	Scanner scan = new Scanner(System.in);
	Dice dice = new Dice(scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt(),scan.nextInt());

		String str = scan.next();
		for(int i=0;i<str.length();i++){
			dice.rollDice(String.valueOf(str.charAt(i)));
		}

		Map<String,Integer> dicenum =dice.getDice();
		
		System.out.println(dicenum.get("top"));
		

	}
}

Compiler output:
Main.java:6: error: class Dice is public, should be declared in a file named Dice.java
public class Dice {
       ^
1 error
Language: Java

package codeiq;

import java.util.Scanner;

public class Dice {
   public static void main(String[] args){
	  Scanner s=new Scanner(System.in);
	  int a[]={s.nextInt(),s.nextInt(),s.nextInt(),s.nextInt(),s.nextInt(),s.nextInt()};
	  String c=s.next();
	  //System.out.println(c);
	  Dicelabel q=new Dicelabel(a[0],a[3],a[2],a[4],a[1],a[5]);
	  for(int i=0;i<c.length();i++){
	    q=q.diceRoll(c.charAt(i));
	  }
	  System.out.println(q.number);
   }
}


class Dicelabel{
	int number;
    int eroll;
    int wroll;
    int nroll;
    int sroll;
    int under;
    Dicelabel(int number,int e,int w,int s,int n,int under){
    	this.number=number;
    	this.eroll=e;
    	this.wroll=w;
    	this.sroll=s;
    	this.nroll=n;
    	this.under=under;
    }
	
	Dicelabel diceRoll(char direction){
		if(direction=='E'){
			return new Dicelabel(eroll,under,number,sroll,nroll,wroll);
		}
		if(direction=='W'){
			return new Dicelabel(wroll,number,under,sroll,nroll,eroll);
		}
		if(direction=='S'){
			return new Dicelabel(sroll,eroll,wroll,under,number,nroll);
		}
		if(direction=='N'){
			return new Dicelabel(nroll,eroll,wroll,number,under,sroll);
		}
		return null;
	}
}

Compiler output:
Main.java:5: error: class Dice is public, should be declared in a file named Dice.java
public class Dice {
       ^
1 error
Language: Java

package codeiq;

import java.util.Scanner;

public class Dice {
   public static void main(String[] args){
	  Scanner s=new Scanner(System.in);
	  int a[]={s.nextInt(),s.nextInt(),s.nextInt(),s.nextInt(),s.nextInt(),s.nextInt()};
	  String c=s.next();
	  s.close();
	  Dicelabel q=new Dicelabel(a[0],a[3],a[2],a[4],a[1],a[5]);
	  for(int i=0;i<c.length();i++){
	    q=q.diceRoll(c.charAt(i));
	  }
	  System.out.println(q.number);
	  System.exit(0); 
   }
}


class Dicelabel{
	int number;
    int eroll;
    int wroll;
    int nroll;
    int sroll;
    int under;
    Dicelabel(int number,int e,int w,int s,int n,int under){
    	this.number=number;
    	this.eroll=e;
    	this.wroll=w;
    	this.sroll=s;
    	this.nroll=n;
    	this.under=under;
    }
	
	Dicelabel diceRoll(char direction){
		if(direction=='E'){
			return new Dicelabel(eroll,under,number,sroll,nroll,wroll);
		}
		if(direction=='W'){
			return new Dicelabel(wroll,number,under,sroll,nroll,eroll);
		}
		if(direction=='S'){
			return new Dicelabel(sroll,eroll,wroll,under,number,nroll);
		}
		if(direction=='N'){
			return new Dicelabel(nroll,eroll,wroll,number,under,sroll);
		}
		return null;
	}
}

Compiler output:
Main.java:5: error: class Dice is public, should be declared in a file named Dice.java
public class Dice {
       ^
1 error
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int[] in = new int[6];
		for(int i = 0; i < 6; i++){
			in[i] = scan.nextInt();
		}
		int T = in[0];
		int S = in[1];
		int E = in[2];
		int W = in[3];
		int N = in[4];
		int U = in[5];
		String com = scan.next();
		int len = com.length();
		for(int i = 0; i < len; i++){
			int dir =com.charAt(i);
			if(dir.equals("S")){
				int a = T;
				T = N;
				N = U;
				U = S;
				S = a;
			}
			if(dir.equals("E")){
				int a = T;
				T = W;
				W = U;
				U = E;
				E = a;
			}
			if(dir.equals("N")){
				int a = T;
				T = S;
				S = U;
				U = N;
				N = a;
			}
			if(dir.equals("W")){
				int a = T;
				T = E;
				E = U;
				U = W;
				W = a;
			}
		}
		System.out.println(T);
	}
}

Compiler output:
Main.java:21: error: int cannot be dereferenced
			if(dir.equals("S")){
			      ^
Main.java:28: error: int cannot be dereferenced
			if(dir.equals("E")){
			      ^
Main.java:35: error: int cannot be dereferenced
			if(dir.equals("N")){
			      ^
Main.java:42: error: int cannot be dereferenced
			if(dir.equals("W")){
			      ^
4 errors
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int[] in = new int[6];
		for(int i = 0; i < 6; i++){
			in[i] = scan.nextInt();
		}
		int T = in[0];
		int S = in[1];
		int E = in[2];
		int W = in[3];
		int N = in[4];
		int U = in[5];
		String com = scan.next();
		int len = com.length();
		for(int i = 0; i < len; i++){
			char dir = com.charAt(i);
			if(dir.equals("S")){
				int a = T;
				T = N;
				N = U;
				U = S;
				S = a;
			}
			if(dir.equals("E")){
				int a = T;
				T = W;
				W = U;
				U = E;
				E = a;
			}
			if(dir.equals("N")){
				int a = T;
				T = S;
				S = U;
				U = N;
				N = a;
			}
			if(dir.equals("W")){
				int a = T;
				T = E;
				E = U;
				U = W;
				W = a;
			}
		}
		System.out.println(T);
	}
}

Compiler output:
Main.java:21: error: char cannot be dereferenced
			if(dir.equals("S")){
			      ^
Main.java:28: error: char cannot be dereferenced
			if(dir.equals("E")){
			      ^
Main.java:35: error: char cannot be dereferenced
			if(dir.equals("N")){
			      ^
Main.java:42: error: char cannot be dereferenced
			if(dir.equals("W")){
			      ^
4 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int[] d = new int[6];
		for(int i = 0; i < 6; i++){
			d[i] = scan.nextInt();
		}

		Dice dice = new Dice(d);
		String dirs = scan.next();
		int len = dirs.length();
		for(int i = 0; i < len; i++){
			char ch = dirs.charAt(i);
			switch(ch){
				case 'E' :
					dice.rollEast();
					break;
				case 'W' :
					dice.rollWest();
					break;
				case 'S' :
					dice.rollSouth();
					break;
				case 'N' :
					dice.rollNorth();
					break;
				default :
					break;
			}
		}
		System.out.println(dice.show(Dice.TOP));
	}
}

class Dice{
	int[] d_ = new int[6];
	public static final int
		TOP = 0, SOUTH = 1, EAST = 2,
		WEST = 3, NORTH = 4, BOTTOM = 5;

	public Dice(int[] d_){
		for(int i = 0; i < 6; i++){
			d_[i] = d[i];
		}
	}

	public int show(int side){
		return d_[side];
	}

	public void rollEast(){
		int work = d_[TOP];
		d_[TOP] = d_[WEST];
		d_[WEST] = d_[BOTTOM];
		d_[BOTTOM] = d_[EAST];
		d_[EAST] = work;
	}

	public void rollWest(){
		int work = d_[TOP];
		d_[TOP] = d_[EAST];
		d_[EAST] = d_[BOTTOM];
		d_[BOTTOM] = d_[WEST];
		d_[WEST] = work;
	}

	public void rollSouth(){
		int work = d_[TOP];
		d_[TOP] = d_[NORTH];
		d_[NORTH] = d_[BOTTOM];
		d_[BOTTOM] = d_[SOUTH];
		d_[SOUTH] = work;
	}

	public void rollNorth(){
		int work = d_[TOP];
		d_[TOP] = d_[SOUTH];
		d_[SOUTH] = d_[BOTTOM];
		d_[BOTTOM] = d_[NORTH];
		d_[NORTH] = work;
	}
}

Compiler output:
Main.java:46: error: cannot find symbol
			d_[i] = d[i];
			        ^
  symbol:   variable d
  location: class Dice
1 error
Language: Java


import java.util.Scanner;

class???main{

	// declear
	static final int DICEDESIGN = 6;
    static final int TOP = 0; //?????¢ ex:1
    static final int FRONT = 1;//??£??¢ ex:2
    static final int RIGHT = 2;// ex:3 order:East
    static final int LEFT = 3;// ex:4???order:West
    static final int BACK = 4;//?£???¢ ex:5 order:North
    static final int BOTTOM = 5;// ex:6 order:South

    int[][] dice = new int[DICEDESIGN][2];

    public Dice1(){
    	for (int i = 0; i < DICEDESIGN; i++) {
    		// [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6]]
    		/*for (int j = 0; j < 3; j++) {
    			dice[i][j] = dice[i+1][j+1]; // error
			}*/
			 dice [i][0] = i+1;
			 dice[i][1] = dice [i][0];
		}
    }

	/*
	 * Sample Input
	 * 1 1 2 4 8 16 32
	 * SE
	 * Sample Output
	 * 1 8
	 */

	public Dice1(int[] diceNum) {
		this();

		for(int i = 0; i < DICEDESIGN; i++){
			//[[1, 1], [2, 2], [3, 4], [4, 8], [5, 16], [6, 32]]
            dice[i][1] = diceNum[i];
        }
	}

	public void orderN() {//clear

		// logic T - T ->F, B ->F, BA ->BT, T ->BA
		int[] temp = dice[TOP];
        dice[TOP] = dice[FRONT];
        dice[FRONT] = dice[BOTTOM];
        dice[BOTTOM] = dice[BACK];
        dice[BACK] = temp;
	}

	public  void orderS() {// clear

		// logic BT - F -> BT, T ->F, BA -> T, BT ->BA
		int [] temp = dice[BOTTOM];
		dice[BOTTOM] = dice[FRONT];
		dice[FRONT] = dice[TOP];
		dice[TOP] = dice[BACK];
		dice[BACK] = temp;
	}

	public void orderE() {// chk

		// logic E - R ->F, L ->F, BA -> L, BA -> R
		int[] temp = dice[RIGHT];
		dice[RIGHT] = dice[FRONT];
		dice[FRONT] = dice[LEFT];
		dice[LEFT] = dice[BACK];
		dice[BACK] = temp;

	}

	public void orderW() {// chk

		// logic W - F -> L, R->F, BA->R, L -> BA
		int[] temp = dice[LEFT];
		dice[LEFT] = dice[FRONT];
				dice[FRONT] = dice[RIGHT];
				dice[RIGHT] = dice[BACK];
				dice[BACK] = temp;
    }

	public int outputTOP(int top ){
		//TOP?
		return dice[top][1] ;
	}


	public static void main(String[] args) {

		// Operation Dice1 simulation
		Scanner sc = new Scanner(System.in);

		// dice space save
		String[] tmp = sc.nextLine().split(" ");
		int[] diceNum = new int[Dice1.DICEDESIGN];
		for (int i = 0; i < Dice1.DICEDESIGN; i++) {
			diceNum[i] = Integer.parseInt(tmp[i]);
		}
		Dice1 diceSpace = new Dice1(diceNum);

		// order save
		String[] order = sc.nextLine().split("");

		// order run
		for (int i = 0; i < order.length; i++) {
			switch (order[i]) {
			case "N":
				diceSpace.orderN();
				break;
			case "S":
				diceSpace.orderS();
				break;
			case "E":
				diceSpace.orderE();
				break;
			case "W":
				diceSpace.orderS();
				break;
			}
		}
		System.out.println(diceSpace.outputTOP(diceSpace.TOP));
	}
}

Compiler output:
Main.java:4: error: <identifier> expected
class???main{
     ^
Main.java:17: error: invalid method declaration; return type required
    public Dice1(){
           ^
Main.java:36: error: invalid method declaration; return type required
	public Dice1(int[] diceNum) {
	       ^
3 errors
Language: Java

import java.io.*;

public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line1 = reader.readLine();
		String[] dice = line1.split(" ", -1);
		int[] diceNum = new int[dice.length];
		for (int i = 0; i < dice.length; i++) {
			diceNum[i] = Integer.parseInt(dice[i]);
		} 
		String line2 = reader.readLine();
		char[] direction = line2.toCharArray();
		
		Dice.insert(diceNum);
		int rotate = rotation(diceNum,direction);
		System.out.println(rotate);
	}
	
	static int rotation(int[] dice,char[] chr) {
		int temp;
		for (int i = 0; i < chr.length; i++) {
			if (chr[i] == 'W') {
				//1>4 4>6 6>3 3>1
				temp = dice[0];
				dice[0] = dice[2];
				dice[2] = dice[5];
				dice[5] = dice[3];
				dice[3] = temp;
			} else if (chr[i] == 'E') {
				//1>3 3>6 6>4 4>1
				temp = dice[0];
				dice[0] = dice[3];
				dice[3] = dice[5];
				dice[5] = dice[2];
				dice[2] = temp;
			} else if (chr[i] == 'N') {
				//1>5 5>6 6>2 2>1
				temp = dice[0];
				dice[0] = dice[1];
				dice[1] = dice[5];
				dice[5] = dice[4];
				dice[4] = temp;
			} else if (chr[i] == 'S') {
				//1>2 2>6 6>5 5>1
				temp = dice[0];
				dice[0] = dice[4];
				dice[4] = dice[5];
				dice[5] = dice[1];
				dice[1] = temp;
			}
		}
		return dice[0];
	}
}

Compiler output:
Main.java:15: error: cannot find symbol
		Dice.insert(diceNum);
		^
  symbol:   variable Dice
  location: class Main
1 error
Language: Java

package test;

import java.util.Scanner;

public class Main{
	public static void main(String args[]){

		//sc??¨dice??????????????????????????????
		Scanner sc = new Scanner(System.in);
		Dice dice = new Dice(sc);

		//????????????????????????
		String command = sc.next();

		//????????????char????????????
		for(int i = 0; i < command.length(); i++){
			char action = command.charAt(i);
			//
			dice.roll(action);
		}

		System.out.println(dice.gettopNum());
		sc.close();
	}
}

class Dice {
	//?????£?????????
	private int[] dice = new int[6];

	//?????????????????????
	Dice(Scanner scan){
		for(int i = 0; i < 6; i++){
			this.dice[i] = scan.nextInt();
			//????????????
			//System.out.println("this.dice[" + i + "]" + this.dice[i]);
		}
	}

	//???????????????????????\????????????
	void roll(char action){
		//??????????????´?????????????????????????????¢?????????
		int temp = dice[0];

		//????§??????¨??¢?????????????????????????????????????????????
		switch(action){
		case 'N':
			dice[0] = dice[1];
			dice[1] = dice[5];
			dice[5] = dice[4];
			dice[4] = temp;
			break;

		case 'S':
			dice[0] = dice[4];
			dice[4] = dice[5];
			dice[5] = dice[1];
			dice[1] = temp;
			break;

		case 'E':
			dice[0] = dice[3];
			dice[3] = dice[5];
			dice[5] = dice[2];
			dice[2] = temp;
			break;

		case 'W':
			dice[0] = dice[2];
			dice[2] = dice[5];
			dice[5] = dice[3];
			dice[3] = temp;
			break;

		default :
			break;
		}
	}

	int gettopNum(){
		return dice[0];
	}

Compiler output:
Main.java:82: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java


import java.util.Scanner;

public class Main {
	public static void main(String[]args){
		//????????£?????????????????????
		Scanner sc = new Scanner(System.in);
		//
		String[] str = sc.nextLine().split(" ");
		//
		String direction =sc.next();
		
		//?????????????????°??????
		int[] num = new int[6];
		//????????????????????????????????°????????£??\
		for(int i = 0;i<6;i++){
			num[i] = Integer.parseInt(str[i]);
			//System.out.print(num[i]+ " ");
		}
		//
		
		Saikoro sk = new Saikoro(num, direction);
		System.out.println(sk.getSide());
	}
	//Saikoro????????????
	class Saikoro{
		//??£?¨?
	
		char c;
		int tmp;
		int value=0;
	
	public Saikoro(int[] num, String direction){
		for(int i = 0; i<direction.length(); i++){
			c = direction.charAt(i);
			switch(c){
			case 'N':
				tmp = num[0];
				num[0] = num[1];
				num[1] = num[5];
				num[5] = num[4];
				num[4] = tmp;
				
				break;
			case 'W':
				tmp = num[0];
				num[0] = num[2];
				num[2] = num[5];
				num[5] = num[3];
				num[3] = tmp;
				
				break;
			case 'E':
				tmp = num[0];
				num[0] = num[1];
				num[1] = num[5];
				num[5] = num[4];
				num[2] = tmp;
				break;
			case 'S':
				tmp = num[0];
				num[0] = num[1];
				num[1] = num[5];
				num[5] = num[4];
				num[1] = tmp;
				break;
			default:
			}
			value = num[0];
		}
		
	}
	public int getSide(){
		return value;
		}
	}
}

Compiler output:
Main.java:22: error: non-static variable this cannot be referenced from a static context
		Saikoro sk = new Saikoro(num, direction);
		             ^
1 error
Language: Java

import java.util.Scanner;

public class Main10 {
	public static void main(String[] args){
		//????????£?????????????????????
		Scanner sc = new Scanner(System.in);
		//??°????????????
		String line = sc.nextLine();
		String[] list = line.split(" ");

		//???????????????????????£?¨?
				int[] dice = new  int[6];
				//????????????????????????????´?
				for(int i = 0; i<list.length; i++){
					dice[i] = Integer.parseInt(list[i]);
					//System.out.println(dice[i]);
				}

		//??????????????????
		String operation  = sc.next();

		//????????????1?????????
		char ch = ' ';
		for(int j = 0; j<operation.length(); j++){
			ch = operation.charAt(j);
			//System.out.println(ch);

		//?????????????????¢??????
		int temp;
		switch(ch){
			case'N':
				temp = dice[0];
				dice[0]= dice[1];
				dice[1]=dice[5];
				dice[5]= dice[4];
				dice[4] = temp;

				break;
			case'W':
				temp = dice[0];
				dice[0]= dice[3];
				dice[3]= dice[5];
				dice[5]= dice[2];
				dice[2]= temp;
				break;
			case'E':
				temp = dice[0];
				dice[0]= dice[2];
				dice[2]= dice[5];
				dice[5]= dice[3];
				dice[3]= temp;
				//System.out.println("ch=" +ch);
				//System.out.println("="+temp);
				break;
			case'S':
				temp = dice[0];
				dice[0]= dice[3];
				dice[3]= dice[5];
				dice[5]= dice[2];
				dice[2]= temp;
			//	System.out.println("ch=" +ch);
				System.out.println(temp);
				break;

			default:

			}
		}
	}
}

Compiler output:
Main.java:3: error: class Main10 is public, should be declared in a file named Main10.java
public class Main10 {
       ^
1 error