結果

問題 No.1942 Leading zero
ユーザー LV3zJigVW57oPGyLV3zJigVW57oPGy
提出日時 2022-08-15 16:01:24
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 928 bytes
コンパイル時間 1,689 ms
コンパイル使用メモリ 161,424 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-10 03:28:45
合計ジャッジ時間 1,827 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a;
  cin >> a;
  for(int i=0; i<a; i++){
    string b;
    cin>> b;
    for(int j=0; j<5; j++){
      if(b.at(0) == '0'){
        	if(j==0){
              b.at(0)=b.at(1);
              b.at(1)=b.at(2);
              b.at(2)=b.at(3);
              b.at(3)=b.at(4);
              b.at(4)=false;
            }
        	else if(j==1){              
              b.at(0)=b.at(1);
              b.at(1)=b.at(2);
              b.at(2)=b.at(3);
              b.at(3)=false;
            }
        	else if(j==2){
              b.at(0)=b.at(1);
              b.at(1)=b.at(2);
              b.at(2)=false;
            }
        	else if(j==3){ 
              b.at(0)=b.at(1);
              b.at(1) =false;
            }
        	else if(j==4){
              cout << '0' <<endl;
            }
      }
      else{
        break;
      }
    }
    cout << b << endl;
  }
}
0