結果

問題 No.400 鏡
ユーザー shinwisteria
提出日時 2017-04-01 09:50:48
言語 Java
(openjdk 23)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 472 bytes
コンパイル時間 2,867 ms
コンパイル使用メモリ 74,912 KB
実行使用メモリ 41,092 KB
最終ジャッジ日時 2024-07-07 18:44:19
合計ジャッジ時間 4,599 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

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