結果

問題 No.729 文字swap
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-12 20:01:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 321 bytes
コンパイル時間 2,097 ms
コンパイル使用メモリ 72,356 KB
実行使用メモリ 56,584 KB
最終ジャッジ日時 2023-10-11 11:00:25
合計ジャッジ時間 4,981 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,912 KB
testcase_01 AC 122 ms
55,964 KB
testcase_02 AC 119 ms
55,940 KB
testcase_03 AC 120 ms
55,964 KB
testcase_04 AC 119 ms
55,748 KB
testcase_05 AC 120 ms
56,584 KB
testcase_06 AC 121 ms
55,616 KB
testcase_07 AC 121 ms
55,920 KB
testcase_08 AC 122 ms
55,900 KB
testcase_09 AC 120 ms
56,160 KB
testcase_10 AC 122 ms
55,820 KB
testcase_11 AC 121 ms
56,036 KB
testcase_12 AC 123 ms
55,852 KB
testcase_13 AC 122 ms
55,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		char[] ar = sc.next().toCharArray();
		int i = sc.nextInt(); int j = sc.nextInt();
		
		char temp = ar[i];
		ar[i] = ar[j];
		ar[j] = temp;
		
		System.out.println(String.valueOf(ar));
		
		
	}
}
0