問題一覧 > 通常問題

No.1942 Leading zero

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 313
作問者 : H20 / テスター : 蜜蜂 👑 Kazun
お気に入りにしたユーザー ProblemId : 7811 / 自分の提出
問題文最終更新日: 2022-05-21 00:19:03
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 344 (順位表) の他の問題:

Problem Statement

A 0 placed before the beginning of an integer is called a leading zero.

Examples include 00123 for 123 and 00100 for 100.

Leading zeros are used for purposes such as improving the appearance of multiple numbers arranged vertically.

You are given a positive integer $N$ and $N$ strings $S_1, S_2, \ldots, S_N$ as input.

$S_i$ is a string of $5$ characters consisting of a non-negative integer with 0 or more 0s prepended to it.

For each of $S_1, S_2, \ldots, S_N$, output the value with the leading zeros removed.

Input

$N$
$S_1$
$S_2$
$\vdots$
$S_N$

Constraints

  • $1 \le N \le 10000$
  • $S_i$ is a string of $5$ characters consisting of a non-negative integer with $0$ or more 0s prepended to it
  • $N$ is an integer

Output

Output $N$ lines. On the $i$-th line, output the value of $\mathrm{S}_i$ with the leading zeros removed.

Print a newline at the end.

Sample

Sample 1
Input
6
00123
00100
12345
00002
01001
10000
Output
123
100
12345
2
1001
10000

Remove only the leading zeros in your output.

Sample 2
Input
1
00000
Output
0

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。