結果

問題 No.729 文字swap
ユーザー gon_027
提出日時 2018-09-09 16:10:06
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 228 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 54,616 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-23 14:13:52
合計ジャッジ時間 1,014 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main(void){
    string s;
    cin >> s;

    int i, j;
    cin >> i >> j;

    char sss;

    sss = s[i];
    s[i] = s[j];
    s[j] = sss;

    cout << s << endl;
}
0