提出詳細
ソースコード
import java.io.*;
class TeraCoderE {
BufferedReader in;
int[] answers = {11, 22, 33, 44, 55, 66, 77, 88, 99,
111, 222, 333, 444, 555, 666, 777, 888, 999,
1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999,
11111, 22222, 33333, 44444, 55555, 66666, 77777, 88888, 99999,
111111, 222222, 333333, 444444, 555555, 666666, 777777, 888888, 999999,
1111111, 2222222, 3333333, 4444444, 5555555, 6666666, 7777777, 8888888, 9999999,
11111111, 22222222, 33333333, 44444444, 55555555, 66666666, 77777777, 88888888, 99999999};
TeraCoderE() {
in = new BufferedReader(new InputStreamReader(System.in));
}
void run() {
int[] values;
values = readIntTokens();
int numCases = values[0];
for (int i = 1; i <= numCases; i++) {
values = readIntTokens();
System.out.println("Case #" + i + ":");
System.out.println(answers[values[0] - 1]);
}
close();
}
public static void main(String[] args) {
TeraCoderE app = new TeraCoderE();
app.run();
}
int[] readIntTokens() {
String str;
int[] intTokens;
try {
str = in.readLine();
if (str == null || str.equals("")) return null;
} catch (IOException ioe) {
// ioe.printStackTrace();
return null;
}
String[] tokens = str.split(" ");
intTokens = new int[tokens.length];
for (int i = 0; i < tokens.length; i++) {
intTokens[i] = Integer.parseInt(tokens[i]);
}
return intTokens;
}
void close() {
try {
in.close();
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
}
提出情報
提出時間 |
2019-11-30 15:54:04 |
問題 |
E - ゾロ目
|
ユーザ名 |
neco3
|
状態 |
正解 |
正解率 |
50/50 |
提出出力結果
テストケース情報