結果

問題 No.400 鏡
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-10 02:47:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 466 bytes
コンパイル時間 2,369 ms
コンパイル使用メモリ 76,360 KB
実行使用メモリ 41,628 KB
最終ジャッジ日時 2024-05-04 00:31:59
合計ジャッジ時間 5,463 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
40,944 KB
testcase_01 AC 140 ms
41,036 KB
testcase_02 AC 146 ms
41,124 KB
testcase_03 AC 140 ms
40,860 KB
testcase_04 AC 136 ms
41,152 KB
testcase_05 AC 136 ms
41,068 KB
testcase_06 AC 136 ms
41,060 KB
testcase_07 AC 136 ms
41,060 KB
testcase_08 AC 140 ms
41,240 KB
testcase_09 AC 135 ms
41,628 KB
testcase_10 AC 138 ms
41,100 KB
testcase_11 AC 138 ms
40,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        String [] arr = S.split("");
        int N = arr.length;
        String R = "";
        for(int i=0; i<N; i++){
            if( "<".equals(arr[N-1-i]) ){
                R = R + ">";
            }else{
                R = R + "<";
            }
        }
        System.out.println(R);
    }
}
0