結果

問題 No.400 鏡
ユーザー ぴろずぴろず
提出日時 2016-07-22 22:21:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 1,966 ms
コンパイル使用メモリ 71,988 KB
実行使用メモリ 56,084 KB
最終ジャッジ日時 2023-08-06 05:49:12
合計ジャッジ時間 4,188 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,616 KB
testcase_01 AC 115 ms
55,780 KB
testcase_02 AC 117 ms
55,856 KB
testcase_03 AC 117 ms
55,632 KB
testcase_04 AC 116 ms
55,260 KB
testcase_05 AC 116 ms
55,804 KB
testcase_06 AC 118 ms
55,924 KB
testcase_07 AC 116 ms
56,084 KB
testcase_08 AC 116 ms
55,820 KB
testcase_09 AC 115 ms
53,860 KB
testcase_10 AC 116 ms
55,724 KB
testcase_11 AC 117 ms
56,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no401;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.println(reverse(sc.next()));
	}
	
	public static String reverse(String s) {
		StringBuilder sb = new StringBuilder();
		for(int i=0;i<s.length();i++) {
			sb.append(s.charAt(s.length()-1-i) == '<' ? '>' : '<');
		}
		return sb.toString();
	}

}
0