結果

問題 No.400 鏡
ユーザー matsuyoshi30matsuyoshi30
提出日時 2018-05-15 23:05:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 384 bytes
コンパイル時間 3,560 ms
コンパイル使用メモリ 71,392 KB
実行使用メモリ 55,912 KB
最終ジャッジ日時 2023-09-10 21:07:47
合計ジャッジ時間 5,016 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,640 KB
testcase_01 AC 121 ms
55,436 KB
testcase_02 AC 121 ms
55,536 KB
testcase_03 AC 120 ms
55,872 KB
testcase_04 AC 121 ms
55,608 KB
testcase_05 AC 120 ms
55,824 KB
testcase_06 AC 121 ms
55,528 KB
testcase_07 AC 122 ms
55,500 KB
testcase_08 AC 123 ms
55,684 KB
testcase_09 AC 121 ms
55,868 KB
testcase_10 AC 122 ms
55,912 KB
testcase_11 AC 123 ms
55,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();

        for(int i = s.length() - 1; i >= 0; i--) {
            char c = s.charAt(i);
            if(c == '>') System.out.print('<');
            if(c == '<') System.out.print('>');
        }

        System.out.println();
    }
}
0