結果

問題 No.400 鏡
ユーザー atkrymatkrym
提出日時 2016-11-07 19:53:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 505 bytes
コンパイル時間 1,939 ms
コンパイル使用メモリ 72,308 KB
実行使用メモリ 56,272 KB
最終ジャッジ日時 2023-08-16 14:39:21
合計ジャッジ時間 4,194 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,492 KB
testcase_01 AC 114 ms
56,272 KB
testcase_02 AC 115 ms
55,536 KB
testcase_03 AC 115 ms
54,224 KB
testcase_04 AC 115 ms
55,636 KB
testcase_05 AC 115 ms
55,864 KB
testcase_06 AC 115 ms
55,524 KB
testcase_07 AC 115 ms
55,536 KB
testcase_08 AC 113 ms
55,712 KB
testcase_09 AC 114 ms
55,428 KB
testcase_10 AC 115 ms
55,448 KB
testcase_11 AC 114 ms
55,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        String s = sc.next();
        StringBuilder sb = new StringBuilder();
        for (int i = s.length()-1;i >= 0;i--) {
            char c = s.charAt(i);
            if (c=='<') {
                sb.append('>');
            } else {
                sb.append('<');
            }
        }
        System.out.println(sb.toString());
    }
}
0