Minimum

Find the minimal number.

IN

1
2
3
4

OUT

1

IN

10
3
19
-50
23

OUT

-50

IN

5
4
0
3
2
1

OUT

0

IN

-13
-15
20
-3

OUT

-15

IN

1123
4000
1000
5500

OUT

1000
Login to submit solution


12 symbols perl failed test 1 Wrong answer

                      
instead of
1
Sun Aug 10 17:52:28 2014 vik
sort|head -1
16 symbols perl failed test 1 Code error

syntax error at ./code line 1, near "cat -b " Execution of ./code aborted due to compilation errors.

Sun Aug 10 17:55:25 2014 vik
sort -n|cat -b 1
16 symbols bash failed test 1 Code error

cat: 1: No such file or directory

Sun Aug 10 17:55:46 2014 vik
sort -n|cat -b 1
16 symbols bash failed test 1 Code error

cat: 1: No such file or directory

Sun Aug 10 17:56:04 2014 vik
sort -n|cat -b 1
12 symbols bash failed test 2 Wrong answer
10
instead of
-50
Sun Aug 10 17:56:49 2014 vik
sort|head -1
23 symbols perl failed test 1 Wrong answer

                      
instead of
1
Sun Aug 24 06:03:43 2014 gabrielmad
#!/usr/bin/perl -p
$_<$a and$a=$_}{$_=$a
19 symbols perl failed test 4 Wrong answer
-13
instead of
-15
Thu Sep 4 21:25:24 2014 sago35
#!/usr/bin/perl -p
$_=(sort$_,<>)[0]
22 symbols perl failed test 1 Wrong answer
2
instead of
1
Thu Sep 4 21:52:53 2014 sago35
#!/usr/bin/perl -p
($_)=sort{$a<=>$b}<>
93 symbols ruby2.0 failed test 1 Wrong answer
0
1
0
2
0
3
0
4
instead of
1
Sun Oct 5 04:16:30 2014 fl00r
#!/usr/bin/ruby1.9.1 -p
x=l=0
$_.chars{|a|c='IVXLCDM'.index(a)||next;c=5**(c%2)*10**(c/2);x+=c;c>l&&x-=l*2;l=c}
p x
29 symbols ruby2.0 failed test 1 Wrong answer
2
instead of
1
Sun Oct 5 04:49:13 2014 fl00r
#!/usr/bin/ruby1.9.1 -p
$_=$<.lines.map(&:to_i).min
16 symbols ruby2.0 failed test 4 Wrong answer
-13
instead of
-15
Sun Oct 5 04:52:53 2014 fl00r
puts$<.lines.min
19 symbols perl failed test 1 Wrong answer
hello world
instead of
1
Mon Oct 6 01:33:14 2014 OlegTar
print "hello world"
21 symbols ruby2.0 failed test 4 Wrong answer
-13
instead of
-15
Wed May 6 19:59:37 2015 NightFury1
$><<$<.read.split.min
32 symbols ruby2.0 failed test 1 Code error

./code:1: syntax error, unexpected tIDENTIFIER, expecting end-of-input $><<$<.read.split.map(&:to_i)min ^

Wed May 6 20:00:29 2015 NightFury1
$><<$<.read.split.map(&:to_i)min
16 symbols perl failed test 4 Wrong answer
-13
instead of
-15
Sat Aug 13 23:30:35 2016 vakorol
#!/usr/bin/perl -ap0
($_)=sort@F

View all solutions