結果

問題 No.1942 Leading zero
ユーザー terasaterasa
提出日時 2022-05-21 18:40:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 471 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 81,852 KB
実行使用メモリ 78,504 KB
最終ジャッジ日時 2023-10-20 16:30:52
合計ジャッジ時間 889 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import sys
import pypyjit
import itertools
import heapq
import math
from collections import deque, defaultdict, Counter
import string
import random

input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
pypyjit.set_param('max_unroll_recursion=-1')


N = int(input())
for _ in range(N):
    A = list(input()[:-1])
    dq = deque(A)
    while len(dq) > 0:
        if not dq[0] == '0':
            break
        dq.popleft()
    print(''.join(dq) if len(dq) > 0 else 0)
0