結果

問題 No.729 文字swap
ユーザー fal_rndfal_rnd
提出日時 2019-02-08 19:36:01
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 1,021 ms / 2,000 ms
コード長 183 bytes
コンパイル時間 6,628 ms
コンパイル使用メモリ 246,352 KB
実行使用メモリ 63,160 KB
最終ジャッジ日時 2023-09-14 03:38:23
合計ジャッジ時間 20,507 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 867 ms
62,908 KB
testcase_01 AC 960 ms
62,712 KB
testcase_02 AC 1,021 ms
62,836 KB
testcase_03 AC 861 ms
62,832 KB
testcase_04 AC 860 ms
62,692 KB
testcase_05 AC 896 ms
63,088 KB
testcase_06 AC 856 ms
62,728 KB
testcase_07 AC 858 ms
63,012 KB
testcase_08 AC 865 ms
62,880 KB
testcase_09 AC 852 ms
62,808 KB
testcase_10 AC 845 ms
63,160 KB
testcase_11 AC 841 ms
62,784 KB
testcase_12 AC 857 ms
62,680 KB
testcase_13 AC 852 ms
62,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

object Main extends App{
	val s = new java.util.Scanner(System.in)
	val a = s.next.toCharArray;
	val i,j = s.nextInt;
	val t = a(i);
	a(i) = a(j);
	a(j) = t;
	println(new String(a))
}
0