結果

問題 No.400 鏡
ユーザー kaoetayakaoetaya
提出日時 2016-11-29 13:22:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 348 bytes
コンパイル時間 2,957 ms
コンパイル使用メモリ 75,000 KB
実行使用メモリ 41,260 KB
最終ジャッジ日時 2024-05-05 15:11:53
合計ジャッジ時間 4,973 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
41,112 KB
testcase_01 AC 97 ms
40,152 KB
testcase_02 AC 114 ms
41,128 KB
testcase_03 AC 97 ms
40,440 KB
testcase_04 AC 107 ms
41,240 KB
testcase_05 AC 109 ms
41,252 KB
testcase_06 AC 115 ms
41,208 KB
testcase_07 AC 120 ms
41,232 KB
testcase_08 AC 117 ms
41,260 KB
testcase_09 AC 115 ms
41,232 KB
testcase_10 AC 102 ms
40,272 KB
testcase_11 AC 99 ms
40,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class pre {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
		String str = s.next();
		
		for(int i=str.length()-1;i>=0;i--){
			if(str.charAt(i) == '<')
				System.out.print(">");
			else if(str.charAt(i) == '>')
				System.out.print("<");
		}
		
		System.out.println();
    }
}
0