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

#include <stdio.h>
#include <string.h>
 
int stricmp(char* ch1,char* ch2){
    int ch1_length = 0,ch2_length = 0,div;
    for(int i = 0; ch1[i] != '\0';i++) ch1_length++;
    for(int i = 0; ch2[i] != '\0';i++) ch2_length++;
    if(ch1_length != ch2_length) return -1;
    for(int i = 0; ch1[i] != '\0';i++)
    {
        div = ch1[i] -ch2[i];
        if(div != 0 && div != 32 && div != -32)
            return -1;
    }
    return 0;
}
 
int main(){
    char W[11],T[1001];
    int count = 0;
    scanf("%s",W);
    while(true){
        scanf("%s",T);
        if(strcmp("END_OF_TEXT",T) == 0) break;
        if(stricmp(T, W) == 0) count++;
    }
    printf("%d\n",count);
}

Compile Error Logs:

Status
Judge: 4/4	C++	CPU: 00:00 sec	Memory: 964 KB	Length: 591 B	2016-09-02 18:02
Results for testcases
Case #	Verdict	CPU Time	Memory	In	Out	Case Name
Case #1	: Accepted	00:00	964	63	2	testcase_00
Case #2	: Accepted	00:00	964	370	3	testcase_01
Case #3	: Accepted	00:00	960	678	3	testcase_02
Case #4	: Accepted	00:00	964	597	3	testcase_03

< prev |		/		| next >	 		
 
Judge Input #  ( | )		Judge Output #  ( | )



Compiler output:
a.cc:33:78: error: invalid digit "9" in octal constant
   33 | Judge: 4/4      C++     CPU: 00:00 sec  Memory: 964 KB  Length: 591 B   2016-09-02 18:02
      |                                                                              ^~
a.cc:35:6: error: stray '#' in program
   35 | Case #  Verdict CPU Time        Memory  In      Out     Case Name
      |      ^
a.cc:36:6: error: stray '#' in program
   36 | Case #1 : Accepted      00:00   964     63      2       testcase_00
      |      ^
a.cc:37:6: error: stray '#' in program
   37 | Case #2 : Accepted      00:00   964     370     3       testcase_01
      |      ^
a.cc:38:6: error: stray '#' in program
   38 | Case #3 : Accepted      00:00   960     678     3       testcase_02
      |      ^
a.cc:39:6: error: stray '#' in program
   39 | Case #4 : Accepted      00:00   964     597     3       testcase_03
      |      ^
a.cc:43:13: error: stray '#' in program
   43 | Judge Input #  ( | )            Judge Output #  ( | )
      |             ^
a.cc:43:46: error: stray '#' in program
   43 | Judge Input #  ( | )            Judge Output #  ( | )
      |                                              ^
a.cc:30:1: error: 'Compile' does not name a type
   30 | Compile Error Logs:
      | ^~~~~~~
Language: C++

include <stdio.h>
#include <ctype.h>
#include <string.h>

int main(){
  char search[21], word[21];
  int count=0;
  int i;

  scanf("%s", search);
  while(1){
    scanf(" %s", word);
    if(strcmp(word, "END_OF_TEXT")==0)break;
    for(i=0; word[i]!="\0"; i++){
      word[i]=tolower(word[i]);
    }
    if(strcmp(word, search)==0){
      count++;
    }
  }
  printf("%d\n", count);
  return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:10:3: error: 'scanf' was not declared in this scope
   10 |   scanf("%s", search);
      |   ^~~~~
a.cc:14:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     for(i=0; word[i]!="\0"; i++){
      |              ~~~~~~~^~~~~~
a.cc:21:3: error: 'printf' was not declared in this scope
   21 |   printf("%d\n", count);
      |   ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    3 | #include <string.h>
  +++ |+#include <cstdio>
    4 |
Language: C++

#include <stdio.h>
#include <ctype.h>
#include <string.h>

int main(){
  char search[21], word[21];
  int count=0;
  int i;

  scanf("%s", search);
  while(1){
    scanf(" %s", word);
    if(strcmp(word, "END_OF_TEXT")==0)break;
    for(i=0; word[i]!="\0"; i++){
      word[i]=tolower(word[i]);
    }
    if(strcmp(word, search)==0){
      count++;
    }
  }
  printf("%d\n", count);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     for(i=0; word[i]!="\0"; i++){
      |              ~~~~~~~^~~~~~
Language: C++


#include <iostream>

int main(int argc, const char * argv[]) {
    
    std::string w, ch ;
    
    int counter = 0 ;

    std::cin >> w ;
    
    while (std::cin >> ch) {
        if (ch == "END_OF_TEXT") break ;
        
        std::transform(ch.begin(), ch.end(), ch.begin(), tolower) ;
        counter += ( ch == w ) ;
    }
    
    printf("%d\n", counter) ;
    
    return 0 ;
}




Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:15:14: error: 'transform' is not a member of 'std'
   15 |         std::transform(ch.begin(), ch.end(), ch.begin(), tolower) ;
      |              ^~~~~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main (){
  string s;
  string ss;
  int count=0;
  int i;
  cin >> s;
  for(i=0;i<s.size();i++){
    if('A'<=s[i] && s[i]<='Z')s[i]+='a'-'A';
  }
  cin >> ss;
  while(ss!="END_OF_TEXT"){
    for(i=0;i<ss.size();i++){
      if('A'<=ss[i] && ss[i]<='Z')ss[i]+='a'-'A';
    }
    if(s==ss)count ++;
    cin >> ss;
  }
  cout << count << endl;



Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: expected '}' at end of input
   22 |   cout << count << endl;
      |                         ^
a.cc:5:12: note: to match this '{'
    5 | int main (){
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
	string  y;
	int a = 0;
	cin>>y;
	string  x;
	while(true){
		if(x == "END_OF_TEXt")break;
		if(x == y)a++;

	}
　　　　cout<<a<<endl;
	return 0;
}


Compiler output:
a.cc:13:1: error: extended character 　 is not valid in an identifier
   13 | 　　　　cout<<a<<endl;
      | ^
a.cc:13:1: error: extended character 　 is not valid in an identifier
a.cc:13:1: error: extended character 　 is not valid in an identifier
a.cc:13:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:13:1: error: '\U00003000\U00003000\U00003000\U00003000cout' was not declared in this scope
   13 | 　　　　cout<<a<<endl;
      | ^~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
	string  y;
	int a = 0;
	cin>>y;
	string  x;
	while(true){
		if(x == "END_OF_TEXT")break;
		if(x == y)a++;

	}
　　　　cout<<a<<endl;
	return 0;
}


Compiler output:
a.cc:13:1: error: extended character 　 is not valid in an identifier
   13 | 　　　　cout<<a<<endl;
      | ^
a.cc:13:1: error: extended character 　 is not valid in an identifier
a.cc:13:1: error: extended character 　 is not valid in an identifier
a.cc:13:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:13:1: error: '\U00003000\U00003000\U00003000\U00003000cout' was not declared in this scope
   13 | 　　　　cout<<a<<endl;
      | ^~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
	string  y;
	int a = 0;
	cin>>y;
	string  x;
	while(true){
         cin>>x;
		if(x == "END_OF_TEXT")break;
		if(x == y)a++;

	}
　　　　cout<<a<<endl;
	return 0;
}


Compiler output:
a.cc:14:1: error: extended character 　 is not valid in an identifier
   14 | 　　　　cout<<a<<endl;
      | ^
a.cc:14:1: error: extended character 　 is not valid in an identifier
a.cc:14:1: error: extended character 　 is not valid in an identifier
a.cc:14:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:14:1: error: '\U00003000\U00003000\U00003000\U00003000cout' was not declared in this scope
   14 | 　　　　cout<<a<<endl;
      | ^~~~~~~~~~~~
Language: C++

#include <string.h>

int main(){
        char W[11];
        char I[1000];
        int c = 0;
        int i;
        scanf("%s", W);
        for(c = 0; c < strlen(W); c++){
                if(W[c] >= 'a' && W[c] <= 'z'){
                        W[c] += 'A' - 'a';
                }
        }
        c = 0;
        while(1){
                scanf("%s", I);
                if(!strncmp("END_OF_TEXT", I, 11)){
                        break;
                }
                for(i = 0; i < strlen(I); i++){
                        if(I[i] >= 'a' && I[i] <= 'z'){
                                I[i] += 'A' - 'a';
                        }
                }
                if(!strncmp(W, I, strlen(W))){
                        c++;
                }
        }
        printf("%d\n", c);
        return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf' was not declared in this scope
    8 |         scanf("%s", W);
      |         ^~~~~
a.cc:29:9: error: 'printf' was not declared in this scope
   29 |         printf("%d\n", c);
      |         ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include <string.h>
  +++ |+#include <cstdio>
    2 |
Language: C++

#include <stdio.h>
#include <ctype.h>

#define MAX 1024

char *tolowerstr(char *s){
    int i;
    
    for(i = 0; s[i] != '\0'; ++i){
        s[i] = tolower(s[i]);
    }
    
    return s;
}

int main(){
    char w[MAX], t[MAX];
    int c = 0;
    
    scanf("%s", w);
    tolowerstr(w);
    
    while(scanf("%s", t), strcmp(t, "END_OF_TEXT") != 0){
        if(strcmp(w, tolowerstr(t)) == 0){
            ++c;
        }
    }
    
    printf("%d\n", c);
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:27: error: 'strcmp' was not declared in this scope
   23 |     while(scanf("%s", t), strcmp(t, "END_OF_TEXT") != 0){
      |                           ^~~~~~
a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <ctype.h>
  +++ |+#include <cstring>
    3 |
Language: C++

#include<iostream>
using namespace std;

#define N 1000
int main(){

string s;
string str[N];
int counts=0;
int fi=0;
cin >>s;

while(true){
cin >>str[count];
if(str[count]=="END_OF_TEXT")break;
count++
}

for(int i=0;i<=count;i++){
if(str[i]==s)fi++;
}

cout <<fi<<endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'count' was not declared in this scope; did you mean 'counts'?
   14 | cin >>str[count];
      |           ^~~~~
      |           counts
a.cc:19:16: error: 'count' was not declared in this scope; did you mean 'counts'?
   19 | for(int i=0;i<=count;i++){
      |                ^~~~~
      |                counts
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
string se,moto;
int a=0;
cin>> moto;
while(1){
cin >> se;
if (se == "END_OF_TEXT"){
break;
}
if(moto==se){
a=a+1
}
}
cout << a << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:6: error: expected ';' before '}' token
   16 | a=a+1
      |      ^
      |      ;
   17 | }
      | ~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
string se,moto;
int a=0,m,s;
cin>> moto;
m=moto.length()
while(1){
cin >> se;
s=se.length();
if (se == "END_OF_TEXT"){
break;
}
if(se==moto){
a=a+1
}
}
cout << a << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: expected ';' before 'while'
   10 | m=moto.length()
      |                ^
      |                ;
   11 | while(1){
      | ~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
string se,moto;
int a=0,m,s;
cin>> moto;
m=moto.length()
while(1){
cin >> se;
s=se.length();
if (se == "END_OF_TEXT"){
break;
}
if(se==moto){
a=a+1;
}
}
cout << a << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: expected ';' before 'while'
   10 | m=moto.length()
      |                ^
      |                ;
   11 | while(1){
      | ~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
string se,moto;
int a=0,i=0;
cin>> moto;
for(i=0;i<moto.length();i++){
if(isupper(moto[i])){
moto[i]=tolower(moto[i]);
}
}
while(1){
cin >> se;
int j=0;

if (se == "END_OF_TEXT"){
break;
}
for(j=0;j<se.length();j++){
if(isupper(se[j])){
se[j]=tolower(se[j]);
}
if(se==moto){
a=a+1;
}
}
cout << a << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <cstring>
#include <vector>
#include <cctype>
#include <cstdio>
using namespace std;
#define rep(i, n) for( int i = 0; i < n; i++ )
typedef vector<int> vec;

int main(){
    string s, w;
    cin >> w;
    w = tolower(w);
    int cnt = 0;
    while( cin >> s ){
        if( s == "END_OF_TEXT" ) break;
        if( tolower(s) == w ) cnt++;
    }
    cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: no matching function for call to 'tolower(std::string&)'
   13 |     w = tolower(w);
      |         ~~~~~~~^~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
a.cc:17:20: error: no matching function for call to 'tolower(std::string&)'
   17 |         if( tolower(s) == w ) cnt++;
      |             ~~~~~~~^~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
Language: C++

#include <iostream>
#include <cstring>
#include <vector>
#include <cctype>
#include <cstdio>
using namespace std;
#define rep(i, n) for( int i = 0; i < n; i++ )
typedef vector<int> vec;

int main(){
    string s, w;
    cin >> w;
    int cnt = 0;
    while( cin >> s ){
        if( s == "END_OF_TEXT" ) break;
        if( tolower(s) == w ) cnt++;
    }
    cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: no matching function for call to 'tolower(std::string&)'
   16 |         if( tolower(s) == w ) cnt++;
      |             ~~~~~~~^~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
       Scanner sc = new Scanner(System.in)     
       while(true){
	 String s = sc.next();
	 int m = sc.nextInt();
	 if(s.equals("-")){
	    break;
	 }
	 for(int i = 0; i < m; i++){
	    int h = sc.nextInt();
	    s = s.substring(h) + s.substring(0, h);
	 }
	 System.out.println(s);
       }
    }
}


Compiler output:
Main.java:5: error: ';' expected
       Scanner sc = new Scanner(System.in)     
                                          ^
1 error
Language: Java


import java.util.Scanner;

public class Shuffle {
    public static void main (String[] args) {
        Scanner scan = new Scanner(System.in);
        String result_a = null;
        String result_b = null;

        while (true) {
            String s = scan.next();

            if (s.equals("-")) {
                break;
            }

            int m = scan.nextInt();

            for (int i = 0; i < m; i++) {
                int h = scan.nextInt();
                result_a = s.substring(0,h);
                result_b = s.substring(h);
                
                s = result_b + result_a;


            }

            System.out.println(s);
        }

    }
}


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

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        while(true)
        {
            String str = sc.next();
            if(str.equals("-"))
                break;
            int n = sc.nextInt();
            for(int i = 0 ; i < n ; i++)
            {
                int h = nextInt();
                String a = str.substring(0,h-1);
                String b = str.substring(h);
                str = b + a;
            }
            System.out.println(str);
        }
    }
}


Compiler output:
Main.java:13: error: cannot find symbol
                int h = nextInt();
                        ^
  symbol:   method nextInt()
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(true){
          int sum=0;
                String s = sc.next();
                if(s.equals("-"))
                break;
                int m = sc.nextInt();
                for(int i=0;i<m;i++){
                  int h=sc.nextInt();
                  sum+=h;
                }
                String[] d=s.split("");
                for(int i=sum;i<d.length;i++){
                  System.out.printf("%s",d[i]);
                }
                for(int i=0;i<sum;i++){
                  System.out.printf("%s",d[i]);
                }
                System.out.println("");
              }
              sc.Scanner();
    }
}


Compiler output:
Main.java:24: error: cannot find symbol
              sc.Scanner();
                ^
  symbol:   method Scanner()
  location: variable sc of type Scanner
1 error
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while(true){
        String a = sc.nextLine();
        int b = sc.nextInt();
        int i = 0,flag=0;
        String a1, a2;
        char d[];
        for (i = 0; i < b; i++) {
            char e = sc.nextLine().toCharArray();
            d[i]=e; 

            if(d[0]==('-')){
                flag=1;
                break;
            }
            int c=d[i]-'0';
            a1=a.substring(0,c);
            a2=a.substring(c+1);
            a=a2+a1;
        }
        if(flag==1)break;
        System.out.printf("%s",a);
    }
        sc.close();
    }


Compiler output:
Main.java:30: 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);

        while(true){
        String a = sc.nextLine();
        int b = sc.nextInt();
        int i = 0,flag=0;
        String a1, a2;
        char d[];
        for (i = 0; i < b; i++) {
            char e = sc.nextLine().toCharArray();
            d[i]=e; 

            if(d[0]==('-')){
                flag=1;
                break;
            }
            int c=d[i]-'0';
            a1=a.substring(0,c);
            a2=a.substring(c+1);
            a=a2+a1;
        }
        if(flag==1)break;
        System.out.printf("%s",a);
    }
        sc.close();
    }

}


Compiler output:
Main.java:14: error: incompatible types: char[] cannot be converted to char
            char e = sc.nextLine().toCharArray();
                                              ^
1 error
Language: Java

import java.util.Scanner;
 
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int i, j, k, n, m, l;
        while(true) {
            char[] a = sc.next().toCharArray();
            if(d.equals("-"))break;
            n = a.length;
            char[] c = new char[n];
            m = sc.nextInt();

            for(i = 0; i < m; i++) {
                k = 0;
                l = sc.nextInt();
                char[] b = new char[l];
                for(j = 0; j < l; j++) {
                    b[j] = a[j];
                }
                for(j = l; j < n; j++) {
                    c[k] = a[j];
                    k++;
                }
                for(j = 0; j < l; j++) {
                    c[k] = b[j];
                    k++;
                }
                for(j = 0; j < n; j++) {
                    a[j] = c[j];
                }
            }
            for(i = 0; i < n; i++) {
                System.out.print(a[i]);
            }
            System.out.println();
        }
        sc.close();
    }
}


Compiler output:
Main.java:9: error: cannot find symbol
            if(d.equals("-"))break;
               ^
  symbol:   variable d
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class B {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (true) {
            String m = scan.next();
            if (m.equals("-")) break;
            int x = scan.nextInt();
            for (int i = 0; i < x; i++) {
                int h = scan.nextInt();
                m = m.substring(h) + m.substring(0, h);
            }
            System.out.println(m);
        }
    }
}

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

import java.util.Scanner;

public class B {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (true) {
            String m = scan.next();
            if (m.equals("-")) break;
            int n = scan.nextInt();
            for (int i = 0; i < n; i++) {
                int h = scan.nextInt();
                m = m.substring(h) + m.substring(0, h);
            }
            System.out.println(m);
        }
    }
}

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

class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();

        while(true) {
            String str = scan.nextLine();
            if (str.equals("-")) {
                break;
            }
            int a = scan.nextInt();
            for (int i = 0;i < a; i++) {
                int h = scan.nextInt();
                str = str.substring(h,str.length()) + str.substring(0, h);
            }
            System.out.println(str);
            str = scan.nextLine();
        }
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner scan = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner scan = new Scanner(System.in);
                           ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

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

class Main {
	public static void main(String args[])throws IOException{	
		Scanner scan = new Scanner(System.in);
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
				
		int m, n, h;
		String str;
		
		while(true){
			str = br.readLine();
			if(str.equals("-"))break;
			
			n = str.length(); //??????????????°???????????°???
			
			m = scan.nextInt(); //?????£??????????????°
			
			for(int i = 0; i < m; i++){
				h = scan.nextInt(); //????????? h ????????????
				
				String sub = str.substring(0, h); //
				String sub2 = str.substring(h);
				str = sub2;
				str += sub;
			}
			
			System.out.println(str);
		}
	}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.io.BufferedReader;
^
Main.java:2: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:3: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
Main.java:4: error: class, interface, enum, or record expected
import java.util.Scanner;
^
4 errors
Language: Java

class Main {
	public static void main(String args[]){	
		Scanner scan = new Scanner(System.in);
				
		int m, n, h;
		String str;
		
		while(true){
			str = scan.next();
			if(str.equals("-"))break;
			
			n = str.length(); //??????????????°???????????°???
			
			m = scan.nextInt(); //?????£??????????????°
			
			for(int i = 0; i < m; i++){
				h = scan.nextInt(); //????????? h ????????????

				String sub = str.substring(0, h); //
				String sub2 = str.substring(h);
				str = sub2;
				str += sub;
			}
			
			System.out.println(str);
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		                   ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	private static String[] chara;

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		Boolean isnotEnd=true;
		while (isnotEnd) {
			String defaultstr = str;
			str = br.readLine();
			int[] shuffleamount = new int[count];
			for (int i = 0; i < count; i++) {
				str = br.readLine();
				shuffleamount[i] = Integer.parseInt(str);
			}
			chara = defaultstr.split("", 0);
			int length = chara.length;
			for (int j = 0; j < count; j++) {
				Shuffling(shuffleamount[j], length);
			}
			for (String charac : chara) {
				System.out.print(charac);
			}
			System.out.println();
			str = br.readLine();
			if(str=="-"){
				isnotEnd=false;
			}
		}
	}

	private static void Shuffling(int h, int l) {
		String[] temporary = new String[h];
		for (int k = 0; k < h; k++) {
			temporary[k] = chara[k];
		}
		for (int m = 0; m < l - h; m++) {
			chara[m] = chara[h + m];
		}
		for (int n = 0; n < h; n++) {
			chara[l - h + n] = temporary[n];
		}
	}
}

Compiler output:
Main.java:15: error: cannot find symbol
			int[] shuffleamount = new int[count];
			                              ^
  symbol:   variable count
  location: class Main
Main.java:16: error: cannot find symbol
			for (int i = 0; i < count; i++) {
			                    ^
  symbol:   variable count
  location: class Main
Main.java:22: error: cannot find symbol
			for (int j = 0; j < count; j++) {
			                    ^
  symbol:   variable count
  location: class Main
3 errors
Language: Java

import java.util.*;

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

		Scanner scan = new Scanner(System.in);
		for(;;){
			String input = scan.next();
			if(input.equals("-")){
				break;
			}
			List<Character> listC = new ArrayList<Character>();
			for(int i = 0; i < input.length(); i++){
				char c = input.charAt(i);
				listC.add(c);
			}
			int m = scan.nextInt();
			for(int i = 0; i < m; i++){
				int h = scan.nextInt();
				for(int j = 0; j < h; j++){
					char c = listC.get(j);
					listC.remove(j);
					listC.add(c);
				}
			}
			for(int i = 0; input.length(); i++){
				System.out.print(listC.get(i));
			}
			System.out.println("");
		}
	}
}

Compiler output:
Main.java:3: error: class Main32 is public, should be declared in a file named Main32.java
public class Main32{
       ^
Main.java:26: error: incompatible types: int cannot be converted to boolean
			for(int i = 0; input.length(); i++){
			                           ^
2 errors
Language: Java

import java.util.*;

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

		Scanner scan = new Scanner(System.in);
		for(;;){
			String input = scan.next();
			if(input.equals("-")){
				break;
			}
			List<Character> listC = new ArrayList<Character>();
			int n = input.length();
			for(int i = 0; i < n; i++){
				char c = input.charAt(i);
				listC.add(c);
			}
			int m = scan.nextInt();
			for(int i = 0; i < m; i++){
				int h = scan.nextInt();
				shuffle(h);
			}

			for(char c : listC){
				System.out.print(c);
			}
			System.out.println("");
		}
	}

	private void shuffle(int hh){
		for(int i = 0; i < hh; i++){
			char cc = listC.get(i);
			listC.remove(i);
			listC.add(cc);
		}
	}
}

Compiler output:
Main.java:21: error: non-static method shuffle(int) cannot be referenced from a static context
				shuffle(h);
				^
Main.java:33: error: cannot find symbol
			char cc = listC.get(i);
			          ^
  symbol:   variable listC
  location: class Main
Main.java:34: error: cannot find symbol
			listC.remove(i);
			^
  symbol:   variable listC
  location: class Main
Main.java:35: error: cannot find symbol
			listC.add(cc);
			^
  symbol:   variable listC
  location: class Main
4 errors
Language: Java

import java.util.*;

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

		Scanner scan = new Scanner(System.in);
		for(;;){
			String input = scan.next();
			if(input.equals("-")){
				break;
			}
			List<Character> listC = new ArrayList<Character>();
			int n = input.length();
			for(int i = 0; i < n; i++){
				char c = input.charAt(i);
				listC.add(c);
			}
			int m = scan.nextInt();
			for(int i = 0; i < m; i++){
				int h = scan.nextInt();
				shuffle(h, listC);
			}

			for(char c : listC){
				System.out.print(c);
			}
			System.out.println("");
		}
	}

	private static void shuffle(int hh, List list){
		for(int i = 0; i < hh; i++){
			char cc = list.get(i);
			list.remove(i);
			list.add(cc);
		}
	}
}

Compiler output:
Main.java:33: error: incompatible types: Object cannot be converted to char
			char cc = list.get(i);
			                  ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: Java

import java.util.*;

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

	public static void main(String[] args){
		String input = scan.next();
		int h = scan.nextInt();
		for(int i = 0; i < h; i++){
			int m = scan.nextInt();
			String s = input.substring(0, m);
			String s2 = input.substring(m);
	 		StringBuffer sb = new StringBuffer();
			sb.append(s2).append(s);
			input = sb.toString()
		}
		System.out.println(input);
	}
}

Compiler output:
Main.java:15: error: ';' expected
			input = sb.toString()
			                     ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main1{
	public static void main(String[] arsg) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String str;
		while((str = br.readLine())!=null){
			if(str.equals("_")) break;
			int n = Integer.parseInt(br.readLine());
			for(int i = 0;i<n;i++){
				int h = Integer.parseInt(br.readLine());
				str = str.substring(h, str.length()) + str.substring(0,h);
			}
			System.out.println(str);
		}
	}
}

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

import java.io.*;

public class Main{
	
	public static void mani(String[] args) throws IOException{
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String str;
		while((str = br.readLine() != null) {
			if(str.equals("-")) break;
			int n = Integer.parseInt(br.readLine());
			for(int i = 0;i < n;i++){
				int h = Integer.parseInt(br.readLine());
				str = str.substring(h, str.length()) + str.substring(0,h);
			}
		}
	}
}

Compiler output:
Main.java:10: error: ')' expected
		while((str = br.readLine() != null) {
		                                   ^
1 error
Language: Java

import java.io.*;

public class Main{
	
	public static void mani(String[] args) throws IOException{
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String str;
		while((str = br.readLine() != null) {
			if(str.equals("-")) break;
			int n = Integer.parseInt(br.readLine());
			for(int i = 0;i < n;i++){
				int h = Integer.parseInt(br.readLine());
				str = str.substring(h, str.length()) + str.substring(0,h);
			}
			System.out.println(str);
		}
	}
}

Compiler output:
Main.java:10: error: ')' expected
		while((str = br.readLine() != null) {
		                                   ^
1 error
Language: Java

import java.io.*;

public class Main{
	
	public static void mani(String[] args) throws IOException{
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String str;
		while((str = br.readLine() != null) {
			if(str.equals("-")) break;
			int n = Integer.parseInt(br.readLine());
			for(int i = 0;i < n;i++){
				int h = Integer.parseInt(br.readLine());
				str = str.substring(h, str.length()) + str.substring(0,h);
			}
			
			System.out.println(str);
		}
	}
}

Compiler output:
Main.java:10: error: ')' expected
		while((str = br.readLine() != null) {
		                                   ^
1 error
Language: Java

import java.io.*;

public class Main1{
	public static void main(String[] arsg) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String str;
		while((str = br.readLine())!=null){
			if(str.equals("-")) break;
			int n = Integer.parseInt(br.readLine());
			for(int i = 0;i<n;i++){
				int h = Integer.parseInt(br.readLine());
				str = str.substring(h, str.length()) + str.substring(0,h);
			}
			System.out.println(str);
		}
	}
}

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

package test9;

import java.util.Scanner;

public class Main9B {
	public static void main(String[] args){
		//????????£?????????????????????
		Scanner sc = new Scanner(System.in);
		String str ="";
		//??°?????????
		while(true){
			//???????????????????????????
			str = sc.next(); 
			//"_"????????????????????????
			if(str.equals("_")){
				break;
			}
			//??°????????????
			int num = sc.nextInt();
			
			//??????????????°???????????£?????????
			for(int i = 0;i< num;i++){
				int h = sc.nextInt();
				//
				str = str.substring(h)+str.substring(0,h);
			}
			//??¨???
			System.out.println(str);
		}
	}
}

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


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

class Main {
    public static void main(String[] args) throws IOException {
        int i, n, m; 
        String line, chr;
        String str;
        BufferedReader br = new BufferedReader(new InputStreamReader(System.br));
        
        for(;;){
            str = br.readLine();
            
            if("-".equals(str)) {
                break;
            }
            
            n = Integer.parseInt(in.readLine());
            for(i = 0; i < n; i++) {
                m = Integer.parseInt(str);
                chr = str.substring(0, m);
                line = str.substring(m, str.length());
                str = line + chr;
            }
            System.out.println(str);
        }
        System.out.flush();
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.br));
                                                                           ^
  symbol:   variable br
  location: class System
Main.java:19: error: cannot find symbol
            n = Integer.parseInt(in.readLine());
                                 ^
  symbol:   variable in
  location: class Main
2 errors
Language: Java


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

class Main {
    public static void main(String[] args) throws IOException {
        int i, n, m; 
        String line, chr;
        String str;
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
        for(;;){
            str = br.readLine();
            
            if("-".equals(str)) {
                break;
            }
            
            n = Integer.parseInt(in.readLine());
            for(i = 0; i < n; i++) {
                m = Integer.parseInt(str);
                chr = str.substring(0, m);
                line = str.substring(m, str.length());
                str = line + chr;
            }
            System.out.println(str);
        }
        System.out.flush();
    }
}

Compiler output:
Main.java:19: error: cannot find symbol
            n = Integer.parseInt(in.readLine());
                                 ^
  symbol:   variable in
  location: class Main
1 error
Language: Java




class a9b{
    public static void main(String[] args) throws Exception{
	Scanner scan = new Scanner(System.in);
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	while(true){
	    String str=scan.next();
	    if(str=="-")break;
	    int m = scan.nextInt();
	    for(int n = 0; n < m ; n++){
		int l = scan.nextInt();
		String str1 = str.substring(l);
		String str2 = str.substring(0,l);
	        String str3 = str1.concat(str2);
                System.out.println(str3);
	    } 

	}
	if (br != null){
	    br.close();
	    br = null;
	}
    }
}

Compiler output:
Main.java:6: error: cannot find symbol
	Scanner scan = new Scanner(System.in);
	^
  symbol:   class Scanner
  location: class a9b
Main.java:6: error: cannot find symbol
	Scanner scan = new Scanner(System.in);
	                   ^
  symbol:   class Scanner
  location: class a9b
Main.java:7: error: cannot find symbol
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	^
  symbol:   class BufferedReader
  location: class a9b
Main.java:7: error: cannot find symbol
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	                        ^
  symbol:   class BufferedReader
  location: class a9b
Main.java:7: error: cannot find symbol
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	                                           ^
  symbol:   class InputStreamReader
  location: class a9b
5 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class AOJ_1_9_2 {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		String n,sub;

		while(true){
			n= br.readLine();
			if(n.equals("-")){
				break;
			}
			int num = Integer.parseInt(br.readLine());
			int h[] = new int[num];
			for(int i = 0 ; i < num ; i++){
				h[i]= Integer.parseInt(br.readLine());
				sub = n.substring(0, h[i]);
				n +=sub;
				n = n.substring(h[i]);
			}
			System.out.println(n);
		}


	}

}

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

#include <iostream>
#include <string>
using std::string;

int main() {
    std::ios::sync_with_stdio(false);
    string cards, subcards;
    int n_shuffles, length;

    while(std::cin) {
        std::cin >> cards;
        if (cards == "-") break;

        std::cin >> n_shuffles;
        for (int i = 0; i < n_shuffles; i++) {
            std::cin >> length;
            subcards = cards.substr(0, length);
            cards = cards.substr(length) + subcards;
        }
        std::cout << cards << "\n";
    }

    return 0;
}
Contact GitHub API Training Shop Blog About

Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <string>
^
Main.java:6: error: not a statement
    std::ios::sync_with_stdio(false);
    ^
Main.java:11: error: not a statement
        std::cin >> cards;
                 ^
Main.java:14: error: not a statement
        std::cin >> n_shuffles;
                 ^
Main.java:16: error: not a statement
            std::cin >> length;
                     ^
Main.java:20: error: not a statement
        std::cout << cards << "\n";
                           ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int main() {
^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: ';' expected
    std::ios::sync_with_stdio(false);
                             ^
Main.java:25: error: class, interface, enum, or record expected
Contact GitHub API Training Shop Blog About
^
10 errors
Language: Java

import java.util.*;

public alss Main{
	public static void main(String[] args){
		Scanner sc =new Scanner(System.in);
		while(true){
			String w = sc.nextLine();
		//break	
			if(w.equals("-")){
				break;
			}
			int m = Integer.parseInt(sc.nextLine());
			for(int i=0;i<m;i++){
				int h = Integer.parseInt(sc.nextLine());
				String store1 = w.substring(0,h-1);
				String store2 = w.substring(h);
				w=store1+store2;
			}
			System.out.println(w);
		}
	}
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
public alss Main{
       ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args){
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:22: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.Scanner;

public class M {

	static char[] AB= {'a','b','c','d','e','f','g'
			,'h','i','j','k','l','m','n'
			,'o','p','q','r','s','t','u'
			,'v','w','x','y','z'};
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);

		
		while(true) {
			String W = sc.next();
			if(W.equals("-")) {
				break;
			}
			int a=sc.nextInt();
			for(int i=0;i<a;i++) {
				int s=sc.nextInt();
				String sa=W.substring(0, s);
				String sz=W.substring(s);
				W=sa+sz;
			}
			System.out.println(W);
		}
		
		
				sc.close();
	}

}


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

import java.util.Scanner;

public class M {

	static char[] AB= {'a','b','c','d','e','f','g'
			,'h','i','j','k','l','m','n'
			,'o','p','q','r','s','t','u'
			,'v','w','x','y','z'};
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);

		
		while(true) {
			String W = sc.next();
			if(W.equals("-")) {
				break;
			}
			int a=sc.nextInt();
			for(int i=0;i<a;i++) {
				int s=sc.nextInt();
				String sa=W.substring(0, s);
				String sz=W.substring(s);
				W=sz+sa;
			}
			System.out.println(W);
		}
		
		
				sc.close();
	}

}


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

import java.util.Scanner;

public class M {

	static char[] AB= {'a','b','c','d','e','f','g'
			,'h','i','j','k','l','m','n'
			,'o','p','q','r','s','t','u'
			,'v','w','x','y','z'};
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);

		
		while(true) {
			String W = sc.next();
			if(W.equals("-")) {
				break;
			}
			int a=sc.nextInt();
			for(int i=0;i<a;i++) {
				int s=sc.nextInt();
				String sa=W.substring(0, s);
				String sz=W.substring(s);
				W=sz+sa;
			}
			System.out.println(W);
		}
		
		
				
	}

}


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

import java.util.Scanner;
public class Main {
     
    static char[] k = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
     
 
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        while (true) {
            String W = stdIn.next();
            if(W.equals("-")) {
                break;
            }
            int m = stdIn.nextInt();
            for(int i = 0; i < m; i++) {
                int h = stdIn.nextInt();
                String s1 = W.substring(0, h);
                String s2 = W.substring(h);
                W = s2 + s1;
            }
            System.out.println(W);
        }
    }


Compiler output:
Main.java:23: 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 scan = new Scanner(System.in);
		final String END = "_";
		int shuffle;
		int replace;
		String word, str;
		
		while (true) {
			
			word = scan.next();
			if (word.equals(END)) break;
			
			shuffle = scan.nextInt();
			
			for (int i = 0; i < shuffle; i++) {
				replace = scan.nextInt();
				word = word.replaceFirst(str, "");
				word += str;
				
			}
			
			System.out.println(word);
			
		} 
		
		scan.close();
		
	}
}



Compiler output:
Main.java:21: error: variable str might not have been initialized
				word = word.replaceFirst(str, "");
				                         ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String [] args) {
		
		Scanner scan = new Scanner(System.in);
		final String END = "_";
		int shuffle;
		int replace;
		String word, str;
		
		while (scan.has.Next()) {
			
			word = scan.next();
			
			
			shuffle = scan.nextInt();
			
			for (int i = 0; i < shuffle; i++) {
				replace = scan.nextInt();
				str = word.substring(0, replace);
				word = word.replaceFirst(str, "");
				word += str;
				
			}
			
			System.out.println(word);
			
		} 
		
		scan.close();
		
	}
}



Compiler output:
Main.java:12: error: cannot find symbol
		while (scan.has.Next()) {
		           ^
  symbol:   variable has
  location: variable scan of type Scanner
1 error
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String [] args) {
		
		Scanner scan = new Scanner(System.in);
		final String END = "_";
		int shuffle;
		int replace;
		String word, str;
		
		while (scan.has.Next()) {
			
			word = scan.next();
			if (word.equals(END)) break;
			
			shuffle = scan.nextInt();
			
			for (int i = 0; i < shuffle; i++) {
				replace = scan.nextInt();
				str = word.substring(0, replace);
				word = word.replaceFirst(str, "");
				word += str;
				
			}
			
			System.out.println(word);
			
		} 
		
		scan.close();
		
	}
}



Compiler output:
Main.java:12: error: cannot find symbol
		while (scan.has.Next()) {
		           ^
  symbol:   variable has
  location: variable scan of type Scanner
1 error