結果

問題 No.400 鏡
ユーザー shinwisteriashinwisteria
提出日時 2017-04-01 09:50:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 472 bytes
コンパイル時間 3,304 ms
コンパイル使用メモリ 72,224 KB
実行使用メモリ 56,048 KB
最終ジャッジ日時 2023-09-22 01:54:36
合計ジャッジ時間 5,759 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,476 KB
testcase_01 AC 123 ms
55,760 KB
testcase_02 AC 120 ms
55,524 KB
testcase_03 AC 122 ms
55,760 KB
testcase_04 AC 119 ms
55,932 KB
testcase_05 AC 124 ms
55,824 KB
testcase_06 AC 120 ms
55,880 KB
testcase_07 AC 121 ms
55,944 KB
testcase_08 AC 125 ms
55,840 KB
testcase_09 AC 122 ms
55,780 KB
testcase_10 AC 121 ms
56,048 KB
testcase_11 AC 119 ms
55,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Mirror {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner s = new Scanner(System.in);
		StringBuilder str = new StringBuilder(s.nextLine());
		s.close();
		for(int i = 0;i < str.length();i++){
			if(str.charAt(i) == '<'){
				str.deleteCharAt(i);
				str.insert(0, '>');
			}else{
				str.deleteCharAt(i);
				str.insert(0, '<');
			}
		}
		System.out.println(str);

	}

}
0