結果

問題 No.729 文字swap
ユーザー shioya
提出日時 2018-09-20 22:39:22
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 582 ms
コンパイル使用メモリ 67,136 KB
最終ジャッジ日時 2025-01-06 13:39:24
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<utility>
using namespace std;
int main()
{
	string str;
	cin >> str;
	int n[2];
	cin >> n[0] >> n[1];
	swap(str[n[0]], str[n[1]]);
	cout << str<<endl;
	return 0;
}
0