結果

問題 No.729 文字swap
ユーザー StarMatyan
提出日時 2020-11-25 01:24:06
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 353 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-23 19:00:57
合計ジャッジ時間 1,389 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

inter = input()
inters = input()
inter_n =inters.split(" ")
numf = int(inter_n[0])
nums = int(inter_n[1])
result=""

if numf < nums:
	result = inter[:numf]+inter[nums:nums+1]+inter[numf+1:nums]+inter[numf:numf+1]+inter[nums+1:]
if nums < numf:
	result = inter[:nums]+inter[numf:numf+1]+inter[nums+1:numf]+inter[nums:nums+1]+inter[numf+1:]

print(result)
0