結果

問題 No.292 芸名
ユーザー funakoshifunakoshi
提出日時 2019-06-27 13:54:09
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 932 bytes
コンパイル時間 6,112 ms
コンパイル使用メモリ 102,980 KB
実行使用メモリ 23,308 KB
最終ジャッジ日時 2023-09-10 05:23:01
合計ジャッジ時間 5,005 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
21,340 KB
testcase_01 AC 76 ms
21,148 KB
testcase_02 AC 75 ms
21,276 KB
testcase_03 AC 76 ms
21,344 KB
testcase_04 AC 75 ms
21,328 KB
testcase_05 AC 75 ms
23,252 KB
testcase_06 AC 75 ms
23,288 KB
testcase_07 AC 74 ms
21,332 KB
testcase_08 AC 75 ms
21,260 KB
testcase_09 AC 76 ms
23,308 KB
testcase_10 WA -
testcase_11 AC 77 ms
21,272 KB
testcase_12 AC 76 ms
23,240 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.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace yukicoderTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            string name = input[0];
            int b = int.Parse(input[1]);
            int c = int.Parse(input[2]);
            string tgt = name.Substring(b, 1);
            string tgt2 = name.Substring(c, 1);
            if(b==c)
            {
                int tgtnum = name.IndexOf(tgt, 0);
                name = name.Remove(b, 1);
            }
            else
            {
                int tgtnum = name.IndexOf(tgt, 0);
                name = name.Remove(tgtnum, 1);
                int tgtnum2 = name.IndexOf(tgt2, 0);
                name = name.Remove(tgtnum2, 1);
            }
            Console.WriteLine(name);
        }

    }
}
0