submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s392121587
p00006
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner; String str=sc.next(); char[] c=new char[str.length()]; for(int i=0;i<str.length();i++){ c[i]=str.charAt(i); } for(int i=str.length()-1;i>=0;i--){ System.out.print(c[i]); } } }
Main.java:5: error: '(' or '[' expected Scanner sc=new Scanner; ^ 1 error
s352788306
p00006
Java
import java.util.Scanner; public class Mmain { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int a = 100000; int n = stdIn.nextInt(); for (int i = 0; i < n; i++) { a *= 1.05; if(a%1000!=0){a+=1000-a%1000;} } System.out.println(a); } }
Main.java:3: error: class Mmain is public, should be declared in a file named Mmain.java public class Mmain { ^ 1 error
s592466514
p00006
Java
import java.io.*; public class Main{ static void scan()throws IOException{ InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); String str=br.readLine(); turn(str); } static void turn(String str){ int l = str.length(); for(int i=l-1;i>0;i--) System.out.print(str.charAt(i)); System.out.println(atr.length(0)); } public static void main(String[] args)throws IOException{ scan(); } }
Main.java:14: error: cannot find symbol System.out.println(atr.length(0)); ^ symbol: variable atr location: class Main 1 error
s231611402
p00006
Java
import java.io.*; public class Main{ static void scan()throws IOException{ InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); String str=br.readLine(); turn(str); } static void turn(String str){ int l = str.length(); for(int i=l-1;i>0;i--) System.out.print(str.charAt(i)); System.out.println(atr.charAt(0)); } public static void main(String[] args)throws IOException{ scan(); } }
Main.java:14: error: cannot find symbol System.out.println(atr.charAt(0)); ^ symbol: variable atr location: class Main 1 error
s347169014
p00006
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; public class Main { public static void main(String[] args) throws Exception { // ???????????????????¨??????§ // Let's ?????£??¬???????????? BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); StringBuilder sb = new StringBuilder(); for(int i=line.length-1;i>=0;i--){ sb.append(line.charAt(i)); } System.out.println(sb.toString()); } }
Main.java:12: error: cannot find symbol for(int i=line.length-1;i>=0;i--){ ^ symbol: variable length location: variable line of type String 1 error
s635205698
p00006
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; public class Main { public static void main(String[] args) throws Exception { // ???????????????????¨??????§ // Let's ?????£??¬???????????? BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); StringBuilder sb = new StringBuilder(); for(int i=line.length-1;i>=0;i--){ sb.append(line.charAt(i)); } System.out.println(sb.toString()); } }
Main.java:12: error: cannot find symbol for(int i=line.length-1;i>=0;i--){ ^ symbol: variable length location: variable line of type String 1 error
s197758719
p00006
Java
import java.util.Collections; class myClass { public static void main(String[] args) { List<String> list = Arrays.adList(args); Collections.reverse(list); for(String c:list){ System.out.print(c); } System.out.println(); } }
Main.java:5: error: cannot find symbol List<String> list = Arrays.adList(args); ^ symbol: class List location: class myClass Main.java:5: error: cannot find symbol List<String> list = Arrays.adList(args); ^ symbol: variable Arrays location: class myClass 2 errors
s448201517
p00006
Java
import java.io.*; import java.util.Scanner; public class Main2 { public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); for(int i=str.length()-1; i >= 0; i-- ){ System.out.print(str.charAt(i)); } } }
Main.java:4: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s017056619
p00006
Java
import java.io.*; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] str=br.readLine(); for(int i=test.length-1;i>=0;i--){ System.out.print(str[i]); } System.out.print("\n"); } }
Main.java:9: error: incompatible types: String cannot be converted to String[] String[] str=br.readLine(); ^ Main.java:11: error: cannot find symbol for(int i=test.length-1;i>=0;i--){ ^ symbol: variable test location: class Main 2 errors
s584494406
p00006
Java
import java.io.*; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); char[] str=br.readLine(); for(int i=test.length-1;i>=0;i--){ System.out.print(str[i]); } System.out.print("\n"); } }
Main.java:9: error: incompatible types: String cannot be converted to char[] char[] str=br.readLine(); ^ Main.java:11: error: cannot find symbol for(int i=test.length-1;i>=0;i--){ ^ symbol: variable test location: class Main 2 errors
s173468746
p00006
Java
public class StringReverse { public static void main(String args[]){ String strOriginal = "abcd123d"; System.out.println(strOriginal); strOriginal = new StringBuffer(strOriginal).reverse().toString(); System.out.println(strOriginal); } }
Main.java:1: error: class StringReverse is public, should be declared in a file named StringReverse.java public class StringReverse { ^ 1 error
s898162402
p00006
Java
import java.io.*; public class Converstion { public static void main(String [] args) throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the string"); String s = br.readLine(); int i,l; char ch; l=s.length(); for(i=0;i<l;i++) { ch=s.charAt(i); if(Character.isUpperCase(ch)) System.out.print(Character.toLowerCase(ch)); else if(Character.isLowerCase(ch)) System.out.print(Character.toUpperCase(ch)); else System.out.print(ch); } } }
Main.java:2: error: class Converstion is public, should be declared in a file named Converstion.java public class Converstion ^ 1 error
s015630770
p00006
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main{ public static void main(String[] a){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); StringBuffer str1 = new StringBuffer(""); if(str != null && !str.isEmpty()) { int l =str.length(); for(int i=l-1;i>=0;i--) { System.out.print(str.charAt(i)); } } } }
Main.java:9: error: unreported exception IOException; must be caught or declared to be thrown String str = br.readLine(); ^ 1 error
s718436407
p00006
Java
public class StringReverseExample1{ public static void main(String[] args){ String string="abcdef"; String reverse = new StringBuffer(string). reverse().toString(); System.out.println("\nString before reverse: "+string); System.out.println("String after reverse: "+reverse); } }
Main.java:6: error: unclosed string literal System.out.println("\nString before reverse: ^ Main.java:7: error: unclosed string literal "+string); ^ Main.java:8: error: unclosed string literal System.out.println("String after reverse: ^ Main.java:9: error: unclosed string literal "+reverse); ^ 4 errors
s266250792
p00006
Java
class Main{ public static void main(String[] a){ File file = new File("reverse.txt"); try { Scanner input = new Scanner(file); String OrigWord = input.nextLine(); int OrigLen = OrigWord.length(); String NewWord = ""; for (int x=OrigLen-1; x >= 0; x--){ NewWord = NewWord + (OrigWord.charAt(x)); } System.out.println(NewWord); } catch (IOException ex) { System.out.println(ex); } } }
Main.java:3: error: cannot find symbol File file = new File("reverse.txt"); ^ symbol: class File location: class Main Main.java:3: error: cannot find symbol File file = new File("reverse.txt"); ^ symbol: class File location: class Main Main.java:6: error: cannot find symbol Scanner input = new Scanner(file); ^ symbol: class Scanner location: class Main Main.java:6: error: cannot find symbol Scanner input = new Scanner(file); ^ symbol: class Scanner location: class Main Main.java:19: error: cannot find symbol catch (IOException ex) { ^ symbol: class IOException location: class Main 5 errors
s480465750
p00006
Java
import java.io.File; import java.io.IOException; import java.util.Scanner; class Main{ public static void main(String[] a){ Scanner file = new Scanner("System.in"); try { Scanner input = new Scanner(file); String OrigWord = input.nextLine(); int OrigLen = OrigWord.length(); String NewWord = ""; for (int x=OrigLen-1; x >= 0; x--){ NewWord = NewWord + (OrigWord.charAt(x)); } System.out.println(NewWord); } catch (IOException ex) { System.out.println(ex); } } }
Main.java:10: error: no suitable constructor found for Scanner(Scanner) Scanner input = new Scanner(file); ^ constructor Scanner.Scanner(Readable) is not applicable (argument mismatch; Scanner cannot be converted to Readable) constructor Scanner.Scanner(InputStream) is not applicable (argument mismatch; Scanner cannot be converted to InputStream) constructor Scanner.Scanner(File) is not applicable (argument mismatch; Scanner cannot be converted to File) constructor Scanner.Scanner(Path) is not applicable (argument mismatch; Scanner cannot be converted to Path) constructor Scanner.Scanner(String) is not applicable (argument mismatch; Scanner cannot be converted to String) constructor Scanner.Scanner(ReadableByteChannel) is not applicable (argument mismatch; Scanner cannot be converted to ReadableByteChannel) Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 1 error
s338434872
p00006
Java
import java.io.File; iimport java.io.File; import java.io.IOException; import java.util.Scanner; import java.io.IOException; import java.util.Scanner; class Main{ public static void main(String[] a){ Scanner file = new Scanner("System.in"); try { Scanner input = new Scanner(file); String OrigWord = input.nextLine(); int OrigLen = OrigWord.length(); String NewWord = ""; for (int x=OrigLen-1; x >= 0; x--){ NewWord = NewWord + (OrigWord.charAt(x)); } System.out.println(NewWord); } catch (IOException ex) { System.out.println(ex); } } }
Main.java:2: error: class, interface, enum, or record expected iimport java.io.File; ^ Main.java:3: error: class, interface, enum, or record expected import java.io.IOException; ^ Main.java:4: error: class, interface, enum, or record expected import java.util.Scanner; ^ Main.java:5: error: class, interface, enum, or record expected import java.io.IOException; ^ Main.java:6: error: class, interface, enum, or record expected import java.util.Scanner; ^ 5 errors
s496493623
p00006
Java
import java.io.File; import java.io.IOException; import java.util.Scanner; class Main{ public static void main(String[] a){ try { Scanner input = new Scanner(System.in); String OrigWord = input.nextLine(); int OrigLen = OrigWord.length(); String NewWord = ""; for (int x=OrigLen-1; x >= 0; x--){ NewWord = NewWord + (OrigWord.charAt(x)); } System.out.println(NewWord); } catch (IOException ex) { System.out.println(ex); } } }
Main.java:22: error: exception IOException is never thrown in body of corresponding try statement catch (IOException ex) { ^ 1 error
s562208095
p00006
Java
import java.io.File; import java.io.IOException; import java.util.Scanner; class Main{ public static void main(String[] a){ try { Scanner input = new Scanner(System.in); String OrigWord = input.nextLine(); int OrigLen = OrigWord.length(); String NewWord = ""; for (int x=OrigLen-1; x >= 0; x--){ NewWord = NewWord + (OrigWord.charAt(x)); } System.out.println(NewWord); } } }
Main.java:7: error: 'try' without 'catch', 'finally' or resource declarations try { ^ 1 error
s874953620
p00006
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class ReverseSequence { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader (new InputStreamReader (System.in)); String chain=br.readLine(); String invertChain=""; for(int i=chain.length()-1; i>=0;i--){ invertChain = invertChain + chain.charAt(i); } System.out.print(invertChain); } }
Main.java:5: error: class ReverseSequence is public, should be declared in a file named ReverseSequence.java public class ReverseSequence { ^ 1 error
s934943050
p00006
Java
import java.io.InputStreamReader; import java.io.BufferedReader; import java.lang.StringBuilder; public class Main { public static void main(String args[] ) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); StringBuilder sb = new StringBuilder(str); System.out.println(sb.reverse()); } }
Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown String str = br.readLine(); ^ 1 error
s027329025
p00006
Java
import java.io.InputStreamReader; import java.io.BufferedReader; import java.lang.StringBuilder; public class Main { public static void main(String args[] ) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); StringBuilder sb = new StringBuilder(str); System.out.println(sb.reverse()); } }
Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown String str = br.readLine(); ^ 1 error
s286363322
p00006
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class ReverseSequence { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); char[] data = str.toCharArray(); char buf; for (int i = 0; i < data.length / 2; i++) { buf = data[i]; data[i] = data[data.length - 1 - i]; data[data.length - 1 - i] = buf; } System.out.println(data); } }
Main.java:5: error: class ReverseSequence is public, should be declared in a file named ReverseSequence.java public class ReverseSequence { ^ 1 error
s410531515
p00006
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Reverse { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); String[] chara = str.split("", 0); int length = chara.length; for (int i = 0; i <= length / 2; i++) { int j = length - i - 1; if (i >= j) { break; } String temporary = chara[i]; chara[i] = chara[j]; chara[j] = temporary; } for (String charac : chara) { System.out.print(charac); } System.out.println(); } }
Main.java:5: error: class Reverse is public, should be declared in a file named Reverse.java public class Reverse { ^ 1 error
s530117963
p00006
Java
import java.util.*; public class Main { public static void main(String[] args) { // ???????????????????¨??????§ // Let's ?????£??¬???????????? Scanner sc = new Scanner(System.in); String line = sc.nextLine(); System.out.println(line.reverse()); } }
Main.java:9: error: cannot find symbol System.out.println(line.reverse()); ^ symbol: method reverse() location: variable line of type String 1 error
s402189139
p00006
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ String str = scan.next(); for(int i = str.length - 1; i >= 0; i--){ char ch = str.charAt(i); System.out.printf("%c", ch); } System.out.printf("\n"); } }
Main.java:8: error: cannot find symbol for(int i = str.length - 1; i >= 0; i--){ ^ symbol: variable length location: variable str of type String 1 error
s399951431
p00006
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main{ public static void main(String[] args) throws IOException{ BufferReader br = new BufferReader(new InputStreamReader(System.in)); String line =""; while((line =br.readLine()) != null&&!line.isEmpty()){ char[] str=line.toCharArray(); char c; int u; for(int i=0;i<str.length/2;i++){ c=str[i]; u=str.length-i-1; str[i]=str[u]; str[u]=c; } System.out.println(str); } } }
Main.java:7: error: cannot find symbol BufferReader br = new BufferReader(new InputStreamReader(System.in)); ^ symbol: class BufferReader location: class Main Main.java:7: error: cannot find symbol BufferReader br = new BufferReader(new InputStreamReader(System.in)); ^ symbol: class BufferReader location: class Main 2 errors
s590144082
p00006
Java
import java.io.*; public class Main{ public static void main(String[] args) throws IOException{ BufferReader br = new BufferReader(new InputStreamReader(System.in)); string line; while((line=br.readLine()) != null){ StringBuffer sb = new StringBuffer().append(line); System.out.print(sb.reverse()+"\n"); } } }
Main.java:5: error: cannot find symbol BufferReader br = new BufferReader(new InputStreamReader(System.in)); ^ symbol: class BufferReader location: class Main Main.java:5: error: cannot find symbol BufferReader br = new BufferReader(new InputStreamReader(System.in)); ^ symbol: class BufferReader location: class Main Main.java:6: error: cannot find symbol string line; ^ symbol: class string location: class Main 3 errors
s866699457
p00006
Java
import java.util.Scanner; public class ReverseSequence { public static void main(String[] args) { try (Scanner scan = new Scanner(System.in)) { StringBuffer str = new StringBuffer(scan.nextLine()); System.out.println(str.reverse()); } catch (Exception e) { System.exit(0); } } }
Main.java:2: error: class ReverseSequence is public, should be declared in a file named ReverseSequence.java public class ReverseSequence { ^ 1 error
s570069752
p00006
Java
import java.util.Scanner; public class Reverse { public static void main(String[] args) { Scanner sc = new Scanner(System.in); StringBuffer sb = new StringBuffer(sc.nextLine()); System.out.println(sb.reverse()); sc.close(); } }
Main.java:3: error: class Reverse is public, should be declared in a file named Reverse.java public class Reverse { ^ 1 error
s387930021
p00006
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String line=sc.nextLine(); for(int i=line.length()-1; i>=0; i--){ System.out.print(line.charAt(i); } }
Main.java:7: error: ')' or ',' expected System.out.print(line.charAt(i); ^ Main.java:9: error: reached end of file while parsing } ^ 2 errors
s819999832
p00006
Java
import java.util.*; public class aoj0006 { public static void main(String[] args){ Scanner sc = new Scanner(System. in); String line = sc.nextLine(); char[] str = line.toCharArray(); char[] rts = new char[20]; for(int i=0;i<20;i++){ str[20-i]=rts[i]; } for(int i=0;i<20;i++){ System.out.print(rts[i]); } } }
Main.java:4: error: class aoj0006 is public, should be declared in a file named aoj0006.java public class aoj0006 { ^ 1 error
s217640190
p00006
Java
import java.util.*; public class aoj0006 { public static void main(String[] args){ Scanner sc = new Scanner(System. in); String line = sc.nextLine(); char[] str = line.toCharArray(); int n = line.length(); char[] rts = new char[20]; for(int i=0;i<n;i++){ rts[i]=str[n-i-1]; } for(int i=0;i<n;i++){ System.out.print(rts[i]); } } }
Main.java:4: error: class aoj0006 is public, should be declared in a file named aoj0006.java public class aoj0006 { ^ 1 error
s499578264
p00006
Java
import java.util.*;class _{void main(){System.out.println(new StringBuffer(new Scanner(System.in).next()).reverse());}
Main.java:1: error: as of release 9, '_' is a keyword, and may not be used as an identifier import java.util.*;class _{void main(){System.out.println(new StringBuffer(new Scanner(System.in).next()).reverse());} ^ Main.java:1: error: reached end of file while parsing import java.util.*;class _{void main(){System.out.println(new StringBuffer(new Scanner(System.in).next()).reverse());} ^ 2 errors
s072975788
p00006
Java
package p1; import java.util.Scanner; public class Main { /** * @param args */ public static void main(String[] args) { // TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ Scanner sc = new Scanner(System.in); System.out.println(sc.next().reverse()); } }
Main.java:16: error: cannot find symbol System.out.println(sc.next().reverse()); ^ symbol: method reverse() location: class String 1 error
s171812212
p00006
Java
class Main{ public static void main(String[] args) throws java.io.IOException{ reverse(); // TODO 自動生成されたメソッド・スタブ } public static void reverse()throws IOException{ BufferedReader input = new BufferedReader (new InputStreamReader (System.in)); String str = input.readLine(); String[] strs =str.split("\\B"); //文字列を文字単位に分割 String restr=""; for(int i=(strs.length) - 1;i>=0;i--){ restr+=strs[i]; //逆順に再結合 } System.out.println( restr); }}
Main.java:10: error: cannot find symbol public static void reverse()throws IOException{ ^ symbol: class IOException location: class Main Main.java:11: error: cannot find symbol BufferedReader input = ^ symbol: class BufferedReader location: class Main Main.java:12: error: cannot find symbol new BufferedReader (new InputStreamReader (System.in)); ^ symbol: class BufferedReader location: class Main Main.java:12: error: cannot find symbol new BufferedReader (new InputStreamReader (System.in)); ^ symbol: class InputStreamReader location: class Main 4 errors
s468843259
p00006
Java
public class Main { public static void main(String[] args) throws IOException { StringBuffer sBuffer = new StringBuffer(); BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in)); String str = bReader.readLine(); sBuffer.append(str); System.out.println(sBuffer.reverse()); } }
Main.java:2: error: cannot find symbol public static void main(String[] args) throws IOException ^ symbol: class IOException location: class Main Main.java:5: error: cannot find symbol BufferedReader bReader = ^ symbol: class BufferedReader location: class Main Main.java:6: error: cannot find symbol new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:6: error: cannot find symbol new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class InputStreamReader location: class Main 4 errors
s081993469
p00006
Java
package Vol000; import java.util.Scanner; public class AOJ0_06 { public static void main(String arg[]) { Scanner sc = new Scanner(System.in); StringBuilder st=new StringBuilder(sc.next()); System.out.println(st.reverse()); } }
Main.java:3: error: class AOJ0_06 is public, should be declared in a file named AOJ0_06.java public class AOJ0_06 ^ 1 error
s909981241
p00006
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Reverse { public static void main(String[] arg) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); char[] s = br.readLine().toCharArray(); int N = s.length; for(int i=0; i<N/2; i++){ char temp = s[i]; s[i] = s[N-i-1]; s[N-i-1] = temp; } System.out.println(s); } }
Main.java:5: error: class Reverse is public, should be declared in a file named Reverse.java public class Reverse ^ 1 error
s895563590
p00006
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Reverse { public static void main(String[] arg) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); char[] s = br.readLine().toCharArray(); int N = s.length; for(int i=0; i<N/2; i++){ char temp = s[i]; s[i] = s[N-i-1]; s[N-i-1] = temp; } System.out.println(s); } }
Main.java:5: error: class Reverse is public, should be declared in a file named Reverse.java public class Reverse ^ 1 error
s451149335
p00006
Java
public class Test { public static String turn(String str) { StringBuffer sb = new StringBuffer(); for (int i = str.length() - 1; i >= 0; i--) { sb.append(str.charAt(i)); } return sb.toString(); } public static void main(String[] args) { String str = "w32nimda"; System.out.println(Test.turn(str)); } }
Main.java:1: error: class Test is public, should be declared in a file named Test.java public class Test ^ 1 error
s795851076
p00006
Java
import java.io.BufferedInputStream; import java.math.BigDecimal; import java.util.Scanner; public class Test { public static String turn(String str) { StringBuffer sb = new StringBuffer(); for (int i = str.length() - 1; i >= 0; i--) { sb.append(str.charAt(i)); } return sb.toString(); } public static void main(String[] args) { String str = "123456789"; System.out.println(Test.turn(str)); } }
Main.java:4: error: class Test is public, should be declared in a file named Test.java public class Test ^ 1 error
s006807584
p00006
Java
import java.io.IOException; import java.io.InputStreamReader; public class P0006 { public static void main(String[] args) throws IOException { InputStreamReader is = new InputStreamReader(System.in); char[] buf = new char[21]; while (is.read(buf) != -1) { } for (int i = buf.length - 1; i >= 0; i--) { if (buf[i] != '\u001F') System.out.print(buf[i]); } } }
Main.java:4: error: class P0006 is public, should be declared in a file named P0006.java public class P0006 { ^ 1 error
s607140150
p00006
Java
public class Main { public static Scanner in; public static void main(String[] args) { in = new Scanner(System.in); doStuff(); } public static void doStuff() { String s = in.nextLine(); char[] c = s.toCharArray(); char[] c2 = new char[c.length]; for(int i = 0; i < c.length; i++) { c2[i] = c[c.length - i - 1]; } String toRet = new String(c2); System.out.println(toRet); } public static void solve() { } }
Main.java:3: error: cannot find symbol public static Scanner in; ^ symbol: class Scanner location: class Main Main.java:7: error: cannot find symbol in = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s125694651
p00006
Java
import java.io.*; class Main1 { public static void main(String args[]) throws IOException { System.out.println("文字列を入力"); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str1 = br.readline(); StringBuffer str2 = new StringBuffer(str1); str2.reverse(); System.out.println(str1 + "を逆順にすると" + str2 + "となる."); } }
Main.java:8: error: cannot find symbol String str1 = br.readline(); ^ symbol: method readline() location: variable br of type BufferedReader 1 error
s541694641
p00006
Java
import java.util.Scanner; import java.util.Arrays; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); char[] a = sc.next().toArray(); for(int i = a.length-1;i>=0;i--){ System.out.print(a[i]); System.out.println(); } } }
Main.java:6: error: cannot find symbol char[] a = sc.next().toArray(); ^ symbol: method toArray() location: class String 1 error
s098609529
p00006
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import org.apache.log4j.Logger; public class Main { private static final Logger logger = Logger.getLogger(Main.class); public static void main(String[] args) throws IOException { StringBuilder builder = new StringBuilder(); InputStreamReader inputStreamReader = new InputStreamReader(System.in); BufferedReader bufferedReader = new BufferedReader(inputStreamReader); String input = bufferedReader.readLine(); builder.append(input); logger.debug(builder.reverse().toString() ); }}
Main.java:6: error: package org.apache.log4j does not exist import org.apache.log4j.Logger; ^ Main.java:10: error: cannot find symbol private static final Logger logger = Logger.getLogger(Main.class); ^ symbol: class Logger location: class Main Main.java:10: error: cannot find symbol private static final Logger logger = Logger.getLogger(Main.class); ^ symbol: variable Logger location: class Main 3 errors
s927866118
p00006
Java
import java.io.*; public class k{ public static void main(String args[]) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str1 = br.readLine(); StringBuffer str = new StringBuffer(str1); StringBuffer str2 = new StringBuffer(str).reverse(); System.out.println(str2); } }
Main.java:4: error: class k is public, should be declared in a file named k.java public class k{ ^ 1 error
s114936514
p00006
Java
import java.util.*; import java.io.*; public class reverseStr { public static void main (String args[]) { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); if (line.length() <= 20 && line.length() > 0) { char[] str = line.toCharArray(); for (int i = str.length-1; i >= 0; i--) { System.out.print(str[i]); } }else{ System.exit(1); } } catch (IOException e) { e.printStackTrace(); } } }
Main.java:4: error: class reverseStr is public, should be declared in a file named reverseStr.java public class reverseStr { ^ 1 error
s935663069
p00006
Java
import java.io.*; import java.math.*; import java.util.*; public class Vol_0_1 { public static void main(String[] arg) throws NumberFormatException, IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String line; String revLine; while ((line = in.readLine()) != null) { revLine = ""; for (int i = line.length() - 1; i >= 0; i--) { revLine = revLine + line.charAt(i); } System.out.println(revLine); } } }
Main.java:5: error: class Vol_0_1 is public, should be declared in a file named Vol_0_1.java public class Vol_0_1 { ^ 1 error
s057554762
p00006
Java
import java.util.Scanner; public class Main { public int calcGCD(int a_in, int b_in) { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println((new StringBuilder(sc.nextLine()).reverse().toString())); } }
Main.java:7: error: illegal start of expression public static void main(String[] args) { ^ 1 error
s829296697
p00006
Java
import java.util.Scanner; public class AOJ_Volume0006 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); StringBuffer sb = new StringBuffer(sc.nextLine()); StringBuffer s = sb.reverse(); System.out.println(s); } }
Main.java:4: error: class AOJ_Volume0006 is public, should be declared in a file named AOJ_Volume0006.java public class AOJ_Volume0006 { ^ 1 error
s656399378
p00006
Java
import java.util.Scanner; /** * Created by Reopard on 2014/05/06. */ public class RevSeq { public static void main(String args[]) { Scanner scanner = new Scanner(System.in); String line = scanner.next(); char tmp[] = line.toCharArray(); char answer[] = new char[20]; for(int i = 0; i < tmp.length; i++) answer[i] = tmp[tmp.length-(i+1)]; line = String.valueOf(answer); System.out.println(line); } }
Main.java:6: error: class RevSeq is public, should be declared in a file named RevSeq.java public class RevSeq { ^ 1 error
s584999665
p00006
C
22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a
main.c:1:1: error: invalid suffix "a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a" on integer constant 1 | 22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.c:1:1: error: expected identifier or '(' before numeric constant
s468250024
p00006
C
key = gets.chomp.to_s n = gets.chomp.to_i data = [] count = 0 for i in 0..n-1 data[i] = gets.chomp.to_s end for i in 0..n-1 check = data[i].include?(key) if check count = count + 1 end end puts count
main.c:1:1: warning: data definition has no type or storage class 1 | key = gets.chomp.to_s | ^~~ main.c:1:1: error: type defaults to 'int' in declaration of 'key' [-Wimplicit-int] main.c:1:7: error: 'gets' undeclared here (not in a function) 1 | key = gets.chomp.to_s | ^~~~ main.c:2:1: error: expected ',' or ';' before 'n' 2 | n = gets.chomp.to_i | ^ main.c:6:10: error: too many decimal points in number 6 | for i in 0..n-1 | ^~~~ main.c:10:10: error: too many decimal points in number 10 | for i in 0..n-1 | ^~~~
s861078766
p00006
C
#include <stdio.h> #include <string.h> int main() { char a[25]; scanf("%[^\n]",a); printf("%s\n",strrev(a)); }
main.c: In function 'main': main.c:7:23: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 7 | printf("%s\n",strrev(a)); | ^~~~~~ | strsep
s931779511
p00006
C
#include<stdio.h> #include<string.h> int main() { char a[1000]; gets(a); strrev(a); printf("%s\n",a); return 0; }
main.c: In function 'main': main.c:6:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 6 | gets(a); | ^~~~ | fgets main.c:7:5: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 7 | strrev(a); | ^~~~~~ | strsep
s536537369
p00006
C
#include<string.h> #include<stdio.h> int main() { char str[20],i,len; gets(str); len=strlen(str); for(i=len-1;i>=0;i--){ printf("%c",str[i]); } return 0; }
main.c: In function 'main': main.c:6:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 6 | gets(str); | ^~~~ | fgets
s828479519
p00006
C
int main(void){ char s[21]; int flag=0; scanf("%s",s); for(int i=20;i>=0;i--){ if(flag==1){ printf("%c",s[i]); } if(s[i]=='\0'){ flag=1; } } return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 7 | scanf("%s",s); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(void){ main.c:7:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 7 | scanf("%s",s); | ^~~~~ main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:10:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 10 | printf("%c",s[i]); | ^~~~~~ main.c:10:25: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:10:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:10:25: note: include '<stdio.h>' or provide a declaration of 'printf'
s050960865
p00006
C
#include<stdio.h> #include<string.h> int main() { char str[20]; scanf("%s",str); strrev(str); printf("%s\n",str); return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 7 | strrev(str); | ^~~~~~ | strsep
s980984636
p00006
C
#include <stdio.h> int main(void) { char s[20]; scanf("%s",s); int n=strlen(s); int i; for(i=n-1;i>=0;i--) { printf("%c",s[i]); } prinf("\n"); return 0; }
main.c: In function 'main': main.c:6:15: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 6 | int n=strlen(s); | ^~~~~~ main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen' 1 | #include <stdio.h> +++ |+#include <string.h> 2 | main.c:6:15: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 6 | int n=strlen(s); | ^~~~~~ main.c:6:15: note: include '<string.h>' or provide a declaration of 'strlen' main.c:11:9: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration] 11 | prinf("\n"); | ^~~~~ | printf
s877467892
p00006
C
#include <stdio.h> int main(void) { char s[20]; scanf("%s",s); int n=strlen(s); int i; for(i=n-1;i>=0;i--) { printf("%c",s[i]); } printf("\n"); return 0;
main.c: In function 'main': main.c:6:15: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 6 | int n=strlen(s); | ^~~~~~ main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen' 1 | #include <stdio.h> +++ |+#include <string.h> 2 | main.c:6:15: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 6 | int n=strlen(s); | ^~~~~~ main.c:6:15: note: include '<string.h>' or provide a declaration of 'strlen' main.c:12:9: error: expected declaration or statement at end of input 12 | return 0; | ^~~~~~
s126570390
p00006
C
using System; using System.Linq; namespace _0006 { class Program { static void Main(string[] args) { string str = Console.ReadLine(); foreach(char e in str.ToCharArray().Reverse()) { Console.Write(e); } Console.WriteLine(); } } }
main.c:1:1: error: unknown type name 'using' 1 | using System; | ^~~~~ main.c:2:1: error: unknown type name 'using' 2 | using System.Linq; | ^~~~~ main.c:2:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 2 | using System.Linq; | ^ main.c:4:1: error: unknown type name 'namespace' 4 | namespace _0006 | ^~~~~~~~~ main.c:5:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 5 | { | ^
s558248015
p00006
C
#include<stdio.h> #include<string.h> int main() { char str[30]; scanf("%s",&str); printf("%s",strrev(str)); return 0; }
main.c: In function 'main': main.c:8:17: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 8 | printf("%s",strrev(str)); | ^~~~~~ | strsep
s980189130
p00006
C
#include<stdio.h> #include<conio.h> void main () { char str[20],ch[20]; int i,len=0; scanf ("%[^\n]",str); for (i=0;str[i]!='\0';i++) { len++; } for (i=0;i<len;i++) { ch[len-1-i]=str[i]; } str[i]='\0'; for (i=0;i<len;i++) { printf ("%c", ch[i]); } getch(); }
main.c:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s981053700
p00006
C
#include<stdio.h> #include<string.h> int main() { char str[21]; scanf("%s",&str); printf("%s",strrev(str)); return 0; }
main.c: In function 'main': main.c:8:17: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 8 | printf("%s",strrev(str)); | ^~~~~~ | strsep
s953827192
p00006
C
#include<stdio.h> #include<string.h> int main() { char x[21]; while(scanf("%s",x)==1) printf("%s\n",strrev(x)); return 0; }
main.c: In function 'main': main.c:8:23: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 8 | printf("%s\n",strrev(x)); | ^~~~~~ | strsep
s012476356
p00006
C
#include<stdio.h> #include<string.h> #include<math.h> int main(){ char a[48],c[48]; int i,j=0; scanf("%s",str); for(i=strlen(str)-1;i>=0;i--){ c[j]=a[i]; j++; } printf("%s",c); return 0; }
main.c: In function 'main': main.c:12:12: error: 'str' undeclared (first use in this function) 12 | scanf("%s",str); | ^~~ main.c:12:12: note: each undeclared identifier is reported only once for each function it appears in
s188637513
p00006
C
#include<stdio.h> int main() { char str[19]; char *rev; scanf("%s",str); rev=strrev(str); printf(" %s",rev); return 0; }
main.c: In function 'main': main.c:7:15: error: implicit declaration of function 'strrev' [-Wimplicit-function-declaration] 7 | rev=strrev(str); | ^~~~~~ main.c:7:14: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 7 | rev=strrev(str); | ^
s432085381
p00006
C
#include<stdio.h> #include<string.h> int main() { char str[20]; char *rev; scanf("%s",str); rev=strrev(str); printf("%s",rev); return 0; }
main.c: In function 'main': main.c:8:15: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 8 | rev=strrev(str); | ^~~~~~ | strsep main.c:8:14: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 8 | rev=strrev(str); | ^
s650478036
p00006
C
#include<stdio.h> #include<string.h> int main(){ char str[50]; char *rev; printf("Enter any string : "); scanf("%s",str); rev = strrev(str); printf("Reverse string is : %s",rev); return 0; }
main.c: In function 'main': main.c:8:11: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 8 | rev = strrev(str); | ^~~~~~ | strsep main.c:8:9: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 8 | rev = strrev(str); | ^
s406881065
p00006
C
#include <stdio.h> #include <string.h> #define SIZE 20 int main(void){ char str[SIZE] = {}; char str_reverse[SIZE] = {}; char c = {\0}; int i = 0; int j = 0; i = 0; while (( ch = getchar()) != EOF ) { str[i] = ch; i++; if (i >= SIZE - 1){ break; } } j = 0; for(i = strlen(str) - 1 ; i > 0; i--){ str_reverse[j] = str[i]; j++; } printf("%s", str_reverse); return 0; }
main.c: In function 'main': main.c:8:19: error: stray '\' in program 8 | char c = {\0}; | ^ main.c:13:18: error: 'ch' undeclared (first use in this function); did you mean 'c'? 13 | while (( ch = getchar()) != EOF ) { | ^~ | c main.c:13:18: note: each undeclared identifier is reported only once for each function it appears in
s229180722
p00006
C
#include <stdio.h> #include <string.h> #define SIZE 20 int main(void){ char str[SIZE] = {}; char str_reverse[SIZE] = {}; char ch = {\0}; int i = 0; int j = 0; i = 0; while (( ch = getchar()) != EOF ) { str[i] = ch; i++; if (i >= SIZE - 1){ break; } } j = 0; for(i = strlen(str) - 1 ; i > 0; i--){ str_reverse[j] = str[i]; j++; } printf("%s", str_reverse); return 0; }
main.c: In function 'main': main.c:8:20: error: stray '\' in program 8 | char ch = {\0}; | ^
s870163848
p00006
C
#include <stdio.h> int main(){ char a[21]; int i=0; fgets(a,sizeof(a),stdin); while (a[i]!=???\n???) {i++;} for (i=i-1;i>=0;i???) {printf(???%c???,a[i]);} printf(???\n???); return 0; }
main.c: In function 'main': main.c:7:14: error: expected expression before '?' token 7 | while (a[i]!=???\n???) {i++;} | ^ main.c:7:17: error: stray '\' in program 7 | while (a[i]!=???\n???) {i++;} | ^ main.c:7:20: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs] 7 | while (a[i]!=???\n???) {i++;} main.c:7:18: error: 'n' undeclared (first use in this function) 7 | while (a[i]!=???\n???) {i++;} | ^ main.c:7:18: note: each undeclared identifier is reported only once for each function it appears in main.c:8:19: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs] 8 | for (i=i-1;i>=0;i???) {printf(???%c???,a[i]);} main.c:8:19: error: expected expression before '?' token 8 | for (i=i-1;i>=0;i???) {printf(???%c???,a[i]);} | ^ main.c:9:8: error: expected expression before '?' token 9 | printf(???\n???); | ^ main.c:9:11: error: stray '\' in program 9 | printf(???\n???); | ^ main.c:9:14: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs] 9 | printf(???\n???);
s757843149
p00006
C
#include <stdio.h> int main(){ char a[1024]; int i=0; fgets(a,sizeof(a),stdin); while (a[i]!=???\n???) {i++;} for (i=i-1;i>=0;i???) {printf(???%c???,a[i]);} printf(???\n???); return 0; }
main.c: In function 'main': main.c:7:14: error: expected expression before '?' token 7 | while (a[i]!=???\n???) {i++;} | ^ main.c:7:17: error: stray '\' in program 7 | while (a[i]!=???\n???) {i++;} | ^ main.c:7:20: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs] 7 | while (a[i]!=???\n???) {i++;} main.c:7:18: error: 'n' undeclared (first use in this function) 7 | while (a[i]!=???\n???) {i++;} | ^ main.c:7:18: note: each undeclared identifier is reported only once for each function it appears in main.c:8:19: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs] 8 | for (i=i-1;i>=0;i???) {printf(???%c???,a[i]);} main.c:8:19: error: expected expression before '?' token 8 | for (i=i-1;i>=0;i???) {printf(???%c???,a[i]);} | ^ main.c:9:8: error: expected expression before '?' token 9 | printf(???\n???); | ^ main.c:9:11: error: stray '\' in program 9 | printf(???\n???); | ^ main.c:9:14: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs] 9 | printf(???\n???);
s246043424
p00006
C
#include <stdio.h> #include <string> using namespace std; int a; char test[20]; char temp; int main() { scanf("%s",test); for(a=strlen(test)-1;a>=0;a--) { printf("%c",test[a]); } return 0; }
main.c:2:10: fatal error: string: No such file or directory 2 | #include <string> | ^~~~~~~~ compilation terminated.
s372074849
p00006
C
#include <stdio.h> int main(void){ char[20] input; scanf("%s", input); int i; for(i=0; ; i++){ if( input[i] == '\0' )break; } for(i--; 0<=i; i--){ printf("%c", input[i]; } printf("\n"); }
main.c: In function 'main': main.c:5:9: error: expected identifier or '(' before '[' token 5 | char[20] input; | ^ main.c:6:17: error: 'input' undeclared (first use in this function); did you mean 'int'? 6 | scanf("%s", input); | ^~~~~ | int main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in main.c:13:30: error: expected ')' before ';' token 13 | printf("%c", input[i]; | ~ ^ | ) main.c:13:31: error: expected ';' before '}' token 13 | printf("%c", input[i]; | ^ | ; 14 | } | ~
s870084872
p00006
C
#include <stdio.h> #define INPUT_MAX 21 int main(void){ char input[INPUT_MAX]; scanf("%s", input); int i; for(i=0; i<INPUT_MAX-1; i++){ if( input[i] == '\0' ) break; } for(i--; 0<=i; i--){ printf("%c", input[i]; } printf("\n"); }
main.c: In function 'main': main.c:14:30: error: expected ')' before ';' token 14 | printf("%c", input[i]; | ~ ^ | ) main.c:14:31: error: expected ';' before '}' token 14 | printf("%c", input[i]; | ^ | ; 15 | } | ~
s745208464
p00006
C
#include<stdio.h> int main(void){ char str[21]; int i; scanf("%s",str); for(i=20,i>=0;i--){ printf("%c"str[i]); } printf("\n"); }
main.c: In function 'main': main.c:9:26: error: expected ';' before ')' token 9 | for(i=20,i>=0;i--){ | ^ | ; main.c:10:28: error: expected ')' before 'str' 10 | printf("%c"str[i]); | ~ ^~~ | )
s480372273
p00006
C
#include<stdio.h> int main(void){ char str[21]; int i; scanf("%s",str); for(i=20,i>=0;i--){ printf("%c"str[i]); } printf("\n"); return 0 }
main.c: In function 'main': main.c:9:26: error: expected ';' before ')' token 9 | for(i=20,i>=0;i--){ | ^ | ; main.c:10:28: error: expected ')' before 'str' 10 | printf("%c"str[i]); | ~ ^~~ | ) main.c:13:9: error: expected ';' before '}' token 13 | return 0 | ^ | ; 14 | 15 | } | ~
s240841875
p00006
C
#include<stdio.h> #include<string.h> int main(void){ char str[21]; int i; scanf("%s",str); for(i=strlen(str),i>=0;i--){ printf("%c"str[i]); } printf("\n"); }
main.c: In function 'main': main.c:10:35: error: expected ';' before ')' token 10 | for(i=strlen(str),i>=0;i--){ | ^ | ; main.c:11:28: error: expected ')' before 'str' 11 | printf("%c"str[i]); | ~ ^~~ | )
s569897731
p00006
C
#include<stdio.h> #include<string.h> int main(void){ char str[21]; int i; scanf("%s",str); for(i=strlen(str),i>=0;i--){ printf("%c"str[i]); } printf("\n"); return 0; }
main.c: In function 'main': main.c:10:35: error: expected ';' before ')' token 10 | for(i=strlen(str),i>=0;i--){ | ^ | ; main.c:11:28: error: expected ')' before 'str' 11 | printf("%c"str[i]); | ~ ^~~ | )
s649872265
p00006
C
#include<stdio.h> #include<string.h> int main(void){ char str[21]; int i; scanf("%s",str); for(i=strlen(str)-1,i>=0;i--){ printf("%c"str[i]); } printf("\n"); return 0; }
main.c: In function 'main': main.c:9:37: error: expected ';' before ')' token 9 | for(i=strlen(str)-1,i>=0;i--){ | ^ | ; main.c:10:20: error: expected ')' before 'str' 10 | printf("%c"str[i]); | ~ ^~~ | )
s976862174
p00006
C
#include<stdio.h> #include<string.h> int main(void){ char str[22]; int i; scanf("%s",str); for(i=strlen(str)-1,i>=0;i--){ printf("%c"str[i]); } printf("\n"); return 0; }
main.c: In function 'main': main.c:9:37: error: expected ';' before ')' token 9 | for(i=strlen(str)-1,i>=0;i--){ | ^ | ; main.c:10:20: error: expected ')' before 'str' 10 | printf("%c"str[i]); | ~ ^~~ | )
s088098637
p00006
C
#include<stdio.h> #include<string.h> int main(void){ char str[22]; int i; scanf("%s",str); for(i=strlen(str)-1,i>=0;i--){ printf("%c"str[i]); } printf("\n"); return 0; }
main.c: In function 'main': main.c:8:37: error: expected ';' before ')' token 8 | for(i=strlen(str)-1,i>=0;i--){ | ^ | ; main.c:9:20: error: expected ')' before 'str' 9 | printf("%c"str[i]); | ~ ^~~ | )
s378973591
p00006
C
#include <stdio.h> ? int main(void) { ????int i,j; ????char mozi[21]; ????scanf("%s",mozi); ????for(i=0;mozi[i]!=0;i++); ????for(j=i-1;j>=0;j--)printf("%c",mozi[j]); ????printf("\n"); ????return 0; }
main.c:2:1: error: expected identifier or '(' before '?' token 2 | ? | ^
s374426825
p00006
C
#include <stdio.h> int main(void) { char str[20] = {0}, str_copy[20] = {0}; int i,j=0; scanf("%s",str); while(1){ if(str[j] == null) break; j++; } for(i=0;i<j;i++){ str_copy[i]=str[j-1-i]; } printf("%s\r\n", str_copy); return 0; }
main.c: In function 'main': main.c:12:30: error: 'null' undeclared (first use in this function) 12 | if(str[j] == null) break; | ^~~~ main.c:12:30: note: each undeclared identifier is reported only once for each function it appears in
s073421044
p00006
C
#include <stdio.h> #include <string.h> int main () { char a[20]; gets(a); strrev(a); printf("%s\n",a); return 0; }
main.c: In function 'main': main.c:5:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 5 | gets(a); | ^~~~ | fgets main.c:7:5: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 7 | strrev(a); | ^~~~~~ | strsep
s653673768
p00006
C
#include<stdio.h> #include<string.h> int main() { char a[100]; gets(a); strrev(a); printf("%s\n",a) return 0; }
main.c: In function 'main': main.c:6:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 6 | gets(a); | ^~~~ | fgets main.c:7:5: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 7 | strrev(a); | ^~~~~~ | strsep main.c:8:21: error: expected ';' before 'return' 8 | printf("%s\n",a) | ^ | ; 9 | 10 | return 0; | ~~~~~~
s412829188
p00006
C
#include <stdio.h> #include <string.h> int main() { char arr[20]; gets(arr); strrev(arr); printf("\n",arr); return 0; }
main.c: In function 'main': main.c:8:4: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 8 | gets(arr); | ^~~~ | fgets main.c:10:4: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 10 | strrev(arr); | ^~~~~~ | strsep
s422041141
p00006
C
#include<stdio.h> #include<conio.h> #include<string.h> void main() { char ch[20]; clrscr(); printf("Enter the String\n"); gets(ch); printf("Reverse is:"); printf("%s",strrev(ch)); getch(); }
main.c:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s258500401
p00006
C
#include<stdio.h> #include<string.h> int main(){ char str[20]; char *rev; gets(str); ("Enter any string : "); ("%s",str); rev = strrev(str); printf("Reverse string is : %s",rev); return 0; }
main.c: In function 'main': main.c:6:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 6 | gets(str); | ^~~~ | fgets main.c:9:11: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 9 | rev = strrev(str); | ^~~~~~ | strsep main.c:9:9: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 9 | rev = strrev(str); | ^
s456537094
p00006
C
#include <stdio.h> #include <string.h> int main() { char a[20]; printf("\n"); gets(a); strrev(a); printf("%s\n",a); return 0; }
main.c: In function 'main': main.c:9:4: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 9 | gets(a); | ^~~~ | fgets main.c:11:4: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 11 | strrev(a); | ^~~~~~ | strsep
s741418844
p00006
C
#include <stdio.h> #include<string.h> int main() { char a[19]; gets(a); strrev(a); printf("%s\n",a); return 0; }
main.c: In function 'main': main.c:8:4: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 8 | gets(a); | ^~~~ | fgets main.c:10:4: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 10 | strrev(a); | ^~~~~~ | strsep
s065788178
p00006
C
#include <stdio.h> #include "stdafx.h" #include <string.h> int main() { char inp[96]; int len; int i; /**--init --**/ for (;;) { /**--input--**/ gets(inp); len = strlen(inp); if (len==0) { break; } for (i=len-1 ; i>=0 ; i--) { printf("%c",inp[i]); } printf("\n"); break; } return 0; }
main.c:2:10: fatal error: stdafx.h: No such file or directory 2 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s756471367
p00006
C
#include<stdio.h> #include<string.h> int main() { char str[50]; char *rev; scanf("%s",str); rev = strrev(str); printf("%s\n",rev); return 0; }
main.c: In function 'main': main.c:8:11: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 8 | rev = strrev(str); | ^~~~~~ | strsep main.c:8:9: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 8 | rev = strrev(str); | ^
s322120044
p00006
C
#include<stdio.h> #include<string.h> int main(){ char name[1000]; while( gets(name) ){ printf("%s\n", strrev(name)); } return 0; }
main.c: In function 'main': main.c:8:8: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 8 | while( gets(name) ){ | ^~~~ | fgets main.c:10:16: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration] 10 | printf("%s\n", strrev(name)); | ^~~~~~ | strsep
s887217220
p00006
C
#include<stdio.h> #include<string.h> int main(void){ char s[32]; int len; scanf("%s",s) len = strlen(s); for(i = len-1;i >= 0;i--){ printf("%c",s[i]) } printf("\n"); return 0; }
main.c: In function 'main': main.c:7:18: error: expected ';' before 'len' 7 | scanf("%s",s) | ^ | ; 8 | len = strlen(s); | ~~~ main.c:9:9: error: 'i' undeclared (first use in this function) 9 | for(i = len-1;i >= 0;i--){ | ^ main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in main.c:10:26: error: expected ';' before '}' token 10 | printf("%c",s[i]) | ^ | ; 11 | } | ~
s995035368
p00006
C
#include<stdio.h> #include<string.h> main() { char str[20]; scanf("%s",str); int i; for(i=strlen(str)-1,i>=0,i--){ printf("%c",str[i]); } puts(); return 0; }
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int] 4 | main() | ^~~~ main.c: In function 'main': main.c:12:30: error: expected ';' before ')' token 12 | for(i=strlen(str)-1,i>=0,i--){ | ^ | ; main.c:12:30: error: expected expression before ')' token main.c:16:2: error: too few arguments to function 'puts' 16 | puts(); | ^~~~ In file included from main.c:1: /usr/include/stdio.h:714:12: note: declared here 714 | extern int puts (const char *__s); | ^~~~
s766130647
p00006
C
#include<stdio.h> #include<string.h> main() { char str[20]; scanf("%s",str); int i; for(i=strlen(str)-1;i>=0;i--){ printf("%c",str[i]); } puts(); return 0; }
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int] 4 | main() | ^~~~ main.c: In function 'main': main.c:16:2: error: too few arguments to function 'puts' 16 | puts(); | ^~~~ In file included from main.c:1: /usr/include/stdio.h:714:12: note: declared here 714 | extern int puts (const char *__s); | ^~~~