_2710

package
v0.0.0-...-5ea41ec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 1 Imported by: 0

README

移除字符串中的尾随零

给你一个用字符串表示的正整数 num ,请你以字符串形式返回不含尾随零的整数__num__。

示例 1:

输入:num = "51230100"
输出:"512301"
解释:整数 "51230100" 有 2 个尾随零,移除并返回整数 "512301" 。

示例 2:

输入:num = "123"
输出:"123"
解释:整数 "123" 不含尾随零,返回整数 "123" 。

提示:

  • 1 <= num.length <= 1000
  • num 仅由数字 09 组成
  • num 不含前导零

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL