結果

問題 No.400 鏡
ユーザー tentententen
提出日時 2020-11-11 14:42:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 443 bytes
コンパイル時間 1,907 ms
コンパイル使用メモリ 74,068 KB
実行使用メモリ 56,716 KB
最終ジャッジ日時 2023-09-30 00:31:42
合計ジャッジ時間 4,102 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
55,840 KB
testcase_01 AC 113 ms
55,604 KB
testcase_02 AC 117 ms
55,832 KB
testcase_03 AC 117 ms
55,696 KB
testcase_04 AC 115 ms
56,716 KB
testcase_05 AC 117 ms
55,844 KB
testcase_06 AC 117 ms
55,812 KB
testcase_07 AC 117 ms
55,784 KB
testcase_08 AC 114 ms
55,664 KB
testcase_09 AC 115 ms
56,120 KB
testcase_10 AC 115 ms
55,752 KB
testcase_11 AC 115 ms
55,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] arr = sc.next().toCharArray();
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == '<') {
                arr[i] = '>';
            } else {
                arr[i] = '<';
            }
        }
        System.out.println(new StringBuilder(new String(arr)).reverse());
    }
}
0