Submission #991301


Source Code Expand

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

public class Main {

	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;
	boolean eof;

	void solve() throws IOException {
		int n = nextInt();
		int m = nextInt();
		
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				String s = nextToken();
				if (s.equals("snuke")) {
					out.print((char)('A' + j));
					out.println(i + 1);
					return;
				}
			}
		}
	}

	Main() throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	public static void main(String[] args) throws IOException {
		new Main();
	}

	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				eof = true;
				return null;
			}
		}
		return st.nextToken();
	}

	String nextString() {
		try {
			return br.readLine();
		} catch (IOException e) {
			eof = true;
			return null;
		}
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
}

Submission Info

Submission Time
Task A - Where's Snuke?
User mmaxio
Language Java8 (OpenJDK 1.8.0)
Score 100
Code Size 1322 Byte
Status AC
Exec Time 105 ms
Memory 8404 KB

Judge Result

Set Name sample all
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 9
Set Name Test Cases
sample sample-01.txt, sample-02.txt
all sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt
Case Name Status Exec Time Memory
01-01.txt AC 101 ms 8140 KB
01-02.txt AC 99 ms 8148 KB
01-03.txt AC 99 ms 8140 KB
01-04.txt AC 99 ms 8148 KB
01-05.txt AC 105 ms 8404 KB
01-06.txt AC 101 ms 8148 KB
01-07.txt AC 102 ms 8276 KB
sample-01.txt AC 100 ms 8272 KB
sample-02.txt AC 100 ms 8016 KB