UVA-10633 - Rare Easy Problem

  • UVa Online Judge 解題結果請於 Submit 後,參閱 uHunt
  • 如果你有任何建議與指教,歡迎於下方留言一起討論喔!
  • 本題選為「20180327 大學程式能力檢定 CPE」題目。

題意概要

假設有一個整數 ,將 去掉個位數字後所形成的數字 ,題目目前已知 ,反求出可能的 為多少 ( 可能有兩組解,輸出須按照由小到大的方式)。


Input

Input consists of multiple lines, one line per case. Each line contains a single positive integer between and inclusive, giving the value of . Input is terminated by a line containing “0”.


Output

For each case, print one line containing the possible values of in sorted order. Separate consecutive numbers with a single space.


Sample Input

18
0

Sample Output

19 20
profile-image
Yung-Sheng Lu
Hello, I'm Yung-Sheng Lu. I am a graduate student in Department of Computer Science at National Chiao Tung University, Taiwan. I am in the Networking and Sensing Systems (NSS) Lab at NCTU.
comments powered by Disqus