結果
| 問題 | No.292 芸名 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-01-26 11:46:36 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 27 ms / 2,000 ms | 
| コード長 | 995 bytes | 
| コンパイル時間 | 2,432 ms | 
| コンパイル使用メモリ | 104,320 KB | 
| 実行使用メモリ | 18,048 KB | 
| 最終ジャッジ日時 | 2024-12-23 11:27:38 | 
| 合計ジャッジ時間 | 3,549 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Linq;
using System.Collections.Generic;
class Program
{
    static void Main(string[] args)
    {
        string[] s = Console.ReadLine().Split();
        char[] ary = s[0].ToCharArray();
        int t = int.Parse(s[1]);
        int u = int.Parse(s[2]);
        int[] x;
        string name = "";
        if (t == u)
        {
            x = new int[] { t };
        }
        else
        {
            x = new int[] { t, u };
        }
        Array.Sort(x);
        int j = 0;
        for (int i = 0; i < ary.Length; i++)
        {
            if (j >= x.Length)
            {
                name += ary[i];
            }
            else
            {
                if (i == x[j])
                {
                    j++;
                    continue;
                }
                else
                {
                    name += ary[i];
                }
            }
        }
        Console.WriteLine(name);
        Console.Read();
    }
}
            
            
            
        