結果

問題 No.1942 Leading zero
ユーザー kai4096_donkai4096_don
提出日時 2022-05-20 21:29:07
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 539 bytes
コンパイル時間 3,928 ms
コンパイル使用メモリ 229,100 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-20 11:47:14
合計ジャッジ時間 4,761 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
//const long nPrime = 1000000007;
//const long nPrime = 998244353;
typedef long long ll;
int main() {
    ll n;
    cin >> n;
    while(n--){
        string s;
        cin >> s;
        for(ll i = 0; i < 5; i++){
            if(i == 4 || s[i] != '0'){
                for(ll j = i; j < 5; j++){
                    cout << s[j];
                }
                cout << endl;
                break;
            }
        }
    }
    return 0;
}
0