結果

問題 No.400 鏡
ユーザー kaoetayakaoetaya
提出日時 2016-11-29 13:22:09
言語 Java19
(openjdk 21)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 348 bytes
コンパイル時間 4,278 ms
コンパイル使用メモリ 71,528 KB
実行使用メモリ 56,140 KB
最終ジャッジ日時 2023-08-18 09:38:47
合計ジャッジ時間 6,399 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,844 KB
testcase_01 AC 122 ms
56,044 KB
testcase_02 AC 121 ms
55,752 KB
testcase_03 AC 120 ms
56,140 KB
testcase_04 AC 121 ms
55,492 KB
testcase_05 AC 121 ms
53,792 KB
testcase_06 AC 120 ms
55,924 KB
testcase_07 AC 120 ms
56,100 KB
testcase_08 AC 121 ms
55,340 KB
testcase_09 AC 118 ms
55,580 KB
testcase_10 AC 118 ms
55,976 KB
testcase_11 AC 117 ms
55,680 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