結果
| 問題 | 
                            No.1942 Leading zero
                             | 
                    
| コンテスト | |
| ユーザー | 
                             marimom7
                         | 
                    
| 提出日時 | 2022-06-30 02:21:47 | 
| 言語 | C#  (.NET 8.0.404)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 854 bytes | 
| コンパイル時間 | 11,495 ms | 
| コンパイル使用メモリ | 170,500 KB | 
| 実行使用メモリ | 214,788 KB | 
| 最終ジャッジ日時 | 2024-11-23 17:53:53 | 
| 合計ジャッジ時間 | 8,702 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 2 | 
| other | WA * 1 | 
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (91 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System;
public class Program
{
    static void Main()
    {
            // データ初期化
			string outputString = "";
			// 初期データ入力
			string line = System.Console.ReadLine();
			// 処理開始
			string readString = "";
			bool checkZero = false;
			for(int i = 0; i < int.Parse(line); i++)
			{
				readString = System.Console.ReadLine();
				checkZero = true;
				for(int stcount = 0; stcount < readString.Length; stcount++)
				{
					// ゼロが終わるまで空回し
					if(checkZero) checkZero = readString[stcount] == '0';
					if(checkZero) continue;
					// 空回しが終わったらデータ作成
					outputString += readString[stcount];
				}
				// 全てが0なら一文字追加する
				if(checkZero) outputString += "0";
				outputString += "\n";
			}
			Console.WriteLine(outputString);
    }
}
            
            
            
        
            
marimom7