結果

問題 No.400 鏡
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-05-03 13:43:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 705 bytes
コンパイル時間 2,476 ms
コンパイル使用メモリ 72,600 KB
実行使用メモリ 49,876 KB
最終ジャッジ日時 2023-10-12 07:56:10
合計ジャッジ時間 3,348 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,456 KB
testcase_01 AC 42 ms
49,444 KB
testcase_02 AC 42 ms
49,232 KB
testcase_03 AC 43 ms
49,252 KB
testcase_04 AC 41 ms
47,284 KB
testcase_05 AC 42 ms
49,380 KB
testcase_06 AC 41 ms
49,088 KB
testcase_07 AC 42 ms
49,372 KB
testcase_08 AC 43 ms
49,076 KB
testcase_09 AC 42 ms
49,876 KB
testcase_10 AC 42 ms
49,064 KB
testcase_11 AC 42 ms
49,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import static java.lang.System.in;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        String S = reader.readLine();
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < S.length(); i++) {
            builder.append(reverse(S.charAt(i)));
        }
        System.out.println(builder.reverse().toString());
    }

    private static char reverse(char c) {
        if (c == '>') {
            return '<';
        } else {
            return '>';
        }
    }

}
0