結果

問題 No.1942 Leading zero
ユーザー TokuzooTokuzoo
提出日時 2022-06-24 23:42:01
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 740 bytes
コンパイル時間 1,685 ms
コンパイル使用メモリ 164,132 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-08 13:28:50
合計ジャッジ時間 2,267 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using edge = pair<int,int>;
using djikstra = priority_queue<edge, vector<edge>, greater<edge>>;
const int INF = 2000000001;
const ll LINF = 9*1e+18;
const int mod = (1e+9)+7;
const int lmod = 998244353;

int gcd(int a, int b){
    if(a%b == 0){
        return b;
    } else {
        return gcd(b, a%b);
    }
}

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int n;
    cin >> n;

    string s;

    while(n--){
        cin >> s;

        for(int i=0; i<s.size(); i++){
            if(s[i] != '0') {
                cout << s.substr(i, s.size()-i) << endl;
                break;
            }
        }
    }
}
0