a068: Broken numbers 破碎的數字
標籤 : String 字串
通過比率 : 100% (9 人 / 9 人 ) (非即時)
評分方式 :
Tolerant

最近更新 : 2019-03-08 13:45

內容

Judy wants to write a secret number to Peter. The method she used to keep her secret is to insert some non-digit characters in any positions. You are asked to find the original number for Peter.

Judy想給Peter寫一個秘密號碼。 她用來保密的方法是在任意的位置插入一些非數字字元。 你被要求找出給Peter的原始號碼。

輸入說明

The input consists of several lines, and each line is a string for one test case. The number is a positive integer no larger than 100000000. The length of each string is no more than 80.

輸入由幾行組成,每行是一個測試用例的字串。 該數字是一個不大於100000000的正整數。每個字串的長度不超過80。

輸出說明

For each case, find the number and print it in one line. If there is no number, output -1.

對於每種情況,找到數字並將其輸出在一行中。如果沒有數字,則輸出-1。

範例輸入
teyg2jdj3dd4*+
-1.3 ww+5-
Judy love Peter
範例輸出
234
135
-1
測資資訊 :
記憶體限制 : 64 MB
隱藏 測資點#0 (50%): 1.0s , <1K
隱藏 測資點#1 (50%): 1.0s , <1K
提示 :
標籤:
String 字串
出處:
線上協同學習平臺 - ITSA 教育部資通訊軟體創新人才推升計畫 [編輯 :
zero_jason (zero_jason(MANAGER))
]


編號 身分 題目 主題 人氣 發表日期
沒有發現任何「解題報告」