結果

問題 No.729 文字swap
ユーザー nalinali
提出日時 2019-08-31 13:11:04
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 343 bytes
コンパイル時間 3,122 ms
コンパイル使用メモリ 100,520 KB
実行使用メモリ 24,072 KB
最終ジャッジ日時 2023-08-16 03:48:03
合計ジャッジ時間 4,534 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
23,856 KB
testcase_01 AC 60 ms
21,856 KB
testcase_02 AC 60 ms
21,948 KB
testcase_03 AC 59 ms
21,888 KB
testcase_04 AC 59 ms
21,940 KB
testcase_05 AC 60 ms
21,816 KB
testcase_06 AC 60 ms
24,072 KB
testcase_07 AC 59 ms
21,952 KB
testcase_08 AC 60 ms
21,828 KB
testcase_09 AC 58 ms
21,932 KB
testcase_10 AC 61 ms
23,840 KB
testcase_11 AC 60 ms
21,820 KB
testcase_12 AC 59 ms
21,972 KB
testcase_13 AC 61 ms
21,820 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;

class Program
{
    static void Main()
    {
        var s = Console.ReadLine().ToCharArray();
        var a = Console.ReadLine().Split().Select(int.Parse).ToArray();
        var i = a[0];
        var j = a[1];
        var t = s[i];
        s[i] = s[j];
        s[j] = t;
        Console.WriteLine(s);
    }
}
0