Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- $szam1=<>;
- chomp($szam1);
- my @tomb;
- for($i=0; $i<=$szam1; $i++)
- {
- print "$i ";
- push (@tomb, $i);
- }
- print "\n";
- if($szam1 > 0)
- {
- for($i=0; $i<=$szam1; $i++)
- {
- if($i%2 == 0)
- {
- print "$i/";
- }
- }
- }
- else
- {
- print "0";
- }
- for($i=0; $i<=$#tomb; $i++)
- {
- if($i%2 == 1)
- {
- if($tomb[$i] != $tomb[-1] && $tomb[$i] != $#tomb && $tomb[$i] != $tomb[-2])
- {
- print "$i/";
- }
- else
- {
- print "$i";
- }
- }
- }
- print "\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement