I'm getting wrong answer eventhough i know it should be correct. Here's my code written in perl.
my $t = 0;
my $c = 0;
my $w = 0;
my $k = 0;
sub main(){
if ($ARGV[0] > 100) { die; }
else { $t = shift @ARGV; }
for (my $i = 0; $i < $t; $i++) {
if ($ARGV[0] < 0) { die; }
else { $c = shift @ARGV; }
$k = shift @ARGV;
if ($ARGV[0] > 100) { die; }
else { $w = shift @ARGV; }
if ( $c * $w <= $k ) { print "yes\n"; }
else { print "no\n";}
}
}
main();
created
last reply
- 2
replies
- 388
views
- 2
users
- 2
links