Reverse

Reverse a given number, and output it.

IN

12345

OUT

54321

IN

120

OUT

21

IN

10000

OUT

1

IN

4837

OUT

7384
Login to submit solution


3 symbols pyth
Mon Sep 19 06:22:55 2016 Sait2000
s_z
11 symbols bash
Wed Aug 13 01:34:44 2014 PFischbeck
rev|tr -d 0
15 symbols perl
Tue Jun 3 18:45:04 2014 bugov
#!/usr/bin/perl -pl
$_=0+reverse
15 symbols bash
Mon Aug 11 01:31:15 2014 jcowgill
expr $(rev) + 0
17 symbols bash
Mon Jun 16 12:55:09 2014 avkhozov
rev|sed 's/^0*//'
17 symbols php
Tue Sep 29 02:03:25 2015 Virsalus
<?=`rev|tr -d 0`;
18 symbols ruby2.0
Mon Jun 16 13:01:47 2014 avkhozov
#!/usr/bin/ruby2.0 -n
p$_.reverse.to_i
22 symbols ruby2.0
Sat Jul 5 12:48:42 2014 Nakilon
puts gets.reverse.to_i
22 symbols ruby
Mon Aug 15 19:16:16 2016 mhib
puts gets.reverse.to_i
24 symbols perl
Fri Apr 4 09:27:25 2014 karjala
print 0+reverse("".<>); 
25 symbols python3
Fri Mar 21 20:20:05 2014 plain_alex
print(int(input()[::-1]))
25 symbols perl
Thu Mar 27 13:28:26 2014 bugov
#!/usr/bin/perl -pl
$_=int reverse split//
25 symbols python3
Wed May 14 16:46:19 2014 popcount
print(int(input()[::-1]))
25 symbols python3
Wed Jun 4 11:24:06 2014 avkhozov
print(int(input()[::-1]))
25 symbols python3
Fri Aug 8 22:08:29 2014 z423x5c6
print(int(input()[::-1]))
26 symbols python2
Wed Aug 13 01:31:22 2014 PFischbeck
print int(`input()`[::-1])
26 symbols php
Tue Sep 29 02:02:03 2015 Virsalus
<?=strrev(fgets(STDIN))+0;
27 symbols php
Tue Sep 29 01:57:06 2015 Virsalus
<?= strrev(fgets(STDIN))+0;
28 symbols ruby2.0
Tue Apr 1 20:41:15 2014 olistik
puts gets.chomp.reverse.to_i
29 symbols python2
Mon Aug 4 18:11:11 2014 LLcoolNJ
print int(str(input())[::-1])

View all solutions