結果

問題 No.400 鏡
ユーザー ぴろずぴろず
提出日時 2016-07-22 22:21:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 1,869 ms
コンパイル使用メモリ 74,348 KB
実行使用メモリ 41,252 KB
最終ジャッジ日時 2024-04-24 02:08:36
合計ジャッジ時間 3,665 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
40,260 KB
testcase_01 AC 106 ms
41,004 KB
testcase_02 AC 100 ms
41,076 KB
testcase_03 AC 94 ms
40,272 KB
testcase_04 AC 102 ms
41,252 KB
testcase_05 AC 110 ms
40,948 KB
testcase_06 AC 96 ms
40,304 KB
testcase_07 AC 90 ms
39,740 KB
testcase_08 AC 96 ms
39,792 KB
testcase_09 AC 106 ms
41,144 KB
testcase_10 AC 107 ms
41,064 KB
testcase_11 AC 108 ms
41,144 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