题解 | #小乐乐改数字#
小乐乐改数字
https://www.nowcoder.com/practice/fcd30aac9c4f4028b23919a0c649824d
using System; using System.Linq; public class Program { public static void Main() { int num = int.Parse(Console.ReadLine()); string str = ""; do { int i = num%10; if((i%2)==1) { i = 1; } else { i = 0; } str += i.ToString(); } while((num=num/10) != 0); string s = new string(str.Reverse().ToArray()); System.Console.WriteLine(int.Parse(s)); } }