三位数反转
Time Limit:1000MS Memory Limit:65536K
Total Submit:443 Accepted:312
Description
输入一个三位数,求他翻转后的三位数
Input
一个三位数
Output
翻转后的三位数,要求忽略前导0
Sample Input
120
Sample Output
21
Source
刘汝佳程序入门
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AK1095 {
class Program {
static void Main(string[] args) {
int n = int.Parse(Console.ReadLine());
Console.WriteLine(n % 10 * 100 + n / 10 % 10 * 10 + n / 100);
}
}
}