結果

問題 No.1469 programing
ユーザー bluemeganebluemegane
提出日時 2021-04-10 07:06:51
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 118 ms / 3,000 ms
コード長 401 bytes
コンパイル時間 1,817 ms
コンパイル使用メモリ 66,816 KB
実行使用メモリ 42,080 KB
最終ジャッジ日時 2023-09-08 03:01:39
合計ジャッジ時間 3,493 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
20,436 KB
testcase_01 AC 49 ms
20,528 KB
testcase_02 AC 50 ms
20,496 KB
testcase_03 AC 50 ms
18,588 KB
testcase_04 AC 51 ms
22,540 KB
testcase_05 AC 50 ms
20,640 KB
testcase_06 AC 50 ms
22,580 KB
testcase_07 AC 50 ms
22,620 KB
testcase_08 AC 52 ms
20,640 KB
testcase_09 AC 53 ms
20,892 KB
testcase_10 AC 54 ms
20,804 KB
testcase_11 AC 54 ms
21,692 KB
testcase_12 AC 54 ms
23,388 KB
testcase_13 AC 50 ms
20,468 KB
testcase_14 AC 56 ms
22,324 KB
testcase_15 AC 53 ms
21,724 KB
testcase_16 AC 56 ms
22,916 KB
testcase_17 AC 118 ms
42,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System.Text;
using System;

public class Hello
{
    static void Main()
    {
        var s = Console.ReadLine().Trim();
        getAns(s);
    }
    static void getAns(string s)
    {
        var sb = new StringBuilder();
        var pre = '0';
        foreach (var x in s)
        {
            if (x != pre) sb.Append(x);
            pre = x;
        }
        Console.WriteLine(sb);
    }
}
0