Submission #144713


Source Code Expand

Copy
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner keyboard = new Scanner(System.in);
		String input = keyboard.nextLine();
		int count = 25 * input.length();
		for (int i=0; i<input.length(); i++){
			for (int j=65; j<91; j++){
				String chk = new String[input.length()] 
				chk = input.substring(0,i) + (char)j + input.substring(i+1,input.length());
				if (palindrome_check(chk) == true){
					count--;
				}
			}
		}
		System.out.println(count);
	}

	public static boolean palindrome_check(String text){
		int limit = (text.length()/2);
		for (int i=0; i<limit; i++){
			if (text.charAt(i) != text.charAt(limit-i-1)){
				return true;
			}
		}
		return false;
	}
}

Submission Info

Submission Time
Task B - こだわりの名前
User coffeeapple
Language Java (OpenJDK 1.7.0)
Score 0
Code Size 745 Byte
Status

Compile Error

./Main.java:10: error: ';' expected
				String chk = new String[input.length()] 
				                                       ^
1 error