結果
問題 |
No.1469 programing
|
ユーザー |
![]() |
提出日時 | 2021-04-10 07:06:51 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 90 ms / 3,000 ms |
コード長 | 401 bytes |
コンパイル時間 | 1,609 ms |
コンパイル使用メモリ | 108,860 KB |
実行使用メモリ | 46,404 KB |
最終ジャッジ日時 | 2024-06-25 20:10:24 |
合計ジャッジ時間 | 3,222 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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); } }