提出 #3479297
ソースコード 拡げる
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/*
* Tenka1 Programmer Beginner Contest A "Measure"
* https://tenka1-2018-beginner.contest.atcoder.jp/tasks/tenka1_2018_a/
*/
public class Main {
public static void main(String[] args) {
InputScanner in = new InputScanner(System.in);
PrintWriter out = new PrintWriter(System.out);
Task task = new Task();
task.run(in, out);
in.close();
out.close();
}
static class Task {
public void run(InputScanner in, PrintWriter out) {
String S = in.next();
if (S.length() == 2) {
out.println(S);
} else {
out.print(String.valueOf(S.charAt(2)));
out.print(String.valueOf(S.charAt(1)));
out.println(String.valueOf(S.charAt(0)));
}
}
}
/*
* extends java.util.Scanner
*/
static class InputScanner {
Scanner scanner;
public InputScanner(InputStream inputStream) {
this.scanner = new Scanner(inputStream);
}
public boolean hasNext() {
return scanner.hasNext();
}
public int nextInt() {
return Integer.parseInt(scanner.next());
}
public long nextLong() {
return Long.parseLong(scanner.next());
}
public double nextDouble() {
return Double.parseDouble(scanner.next());
}
public String next() {
return scanner.next();
}
public int[] nextIntArray(int n) {
int[] ret = new int[n];
for (int i = 0; i < n; i++) {
ret[i] = scanner.nextInt();
}
return ret;
}
public int[][] nextIntArray(int h, int w) {
int[][] ret = new int[h][w];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
ret[i][j] = scanner.nextInt();
}
}
return ret;
}
public long[] nextLongArray(int n) {
long[] ret = new long[n];
for (int i = 0; i < n; i++) {
ret[i] = scanner.nextLong();
}
return ret;
}
public long[][] nextlongArray(int h, int w) {
long[][] ret = new long[h][w];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
ret[i][j] = scanner.nextLong();
}
}
return ret;
}
public double[] nextDoubleArray(int n) {
double[] ret = new double[n];
for (int i = 0; i < n; i++) {
ret[i] = scanner.nextDouble();
}
return ret;
}
public double[][] nextDoubleArray(int h, int w) {
double[][] ret = new double[h][w];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
ret[i][j] = scanner.nextLong();
}
}
return ret;
}
public String[] nextStringArray(int n) {
String[] ret = new String[n];
for (int i = 0; i < n; i++) {
ret[i] = scanner.next();
}
return ret;
}
public String[] nextStringArray(String split) {
String[] ret = scanner.next().split(split);
return ret;
}
public String[][] nextStringArray(int h, int w) {
String[][] ret = new String[h][w];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
ret[i][j] = scanner.next();
}
}
return ret;
}
public String[][] nextStringArray(int h, String split) {
String[][] ret = new String[h][];
for (int i = 0; i < h; i++) {
ret[i] = scanner.next().split(split);
}
return ret;
}
public void close() {
scanner.close();
}
}
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - Measure |
| ユーザ | imo |
| 言語 | Java8 (OpenJDK 1.8.0) |
| 得点 | 100 |
| コード長 | 3353 Byte |
| 結果 | AC |
| 実行時間 | 108 ms |
| メモリ | 23764 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | s1.txt, s2.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, s1.txt, s2.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01.txt | AC | 108 ms | 21204 KiB |
| 02.txt | AC | 89 ms | 18644 KiB |
| 03.txt | AC | 91 ms | 21332 KiB |
| 04.txt | AC | 91 ms | 23764 KiB |
| 05.txt | AC | 90 ms | 20692 KiB |
| 06.txt | AC | 90 ms | 21716 KiB |
| 07.txt | AC | 89 ms | 19284 KiB |
| 08.txt | AC | 91 ms | 19540 KiB |
| s1.txt | AC | 93 ms | 21332 KiB |
| s2.txt | AC | 89 ms | 21076 KiB |