1. Perl / Говнокод #100

    −1006.6

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    @lib_001=('A','G','C','T','A');
    @lib_002=('C','T','A','A','G');		 
    @lib_003=('T','G','C','A','T');
    
    $string=<FILE>;
    @sequence=split("",$string);
    @code=@sequence[-7..-3];
    		
    if((join('',@lib_001) eq join('',@code)) or
        (join('',@lib_001[0..3]) eq join('',@code[0..3])) or
        (join('',@lib_001[1..4]) eq join('',@code[1..4])) or
        (join('',@lib_001[0,1,2,4]) eq join('',@code[0,1,2,4])) or
        (join('',@lib_001[0,2,3,4]) eq join('',@code[0,2,3,4])) or
        (join('',@lib_001[0,1,3,4]) eq join('',@code[0,1,3,4]))) 
    	{$tag=join('',@code);
    	 $closest_tag=join('',@lib_001);}
    			
    elsif((join('',@lib_002) eq join('',@code)) or
         (join('',@lib_002[0..3]) eq join('',@code[0..3])) or
         (join('',@lib_002[1..4]) eq join('',@code[1..4])) or
         (join('',@lib_002[0,1,2,4]) eq join('',@code[0,1,2,4])) or
         (join('',@lib_002[0,2,3,4]) eq join('',@code[0,2,3,4])) or
         (join('',@lib_002[0,1,3,4]) eq join('',@code[0,1,3,4]))) 
    	{$tag=join('',@code);
    	 $closest_tag=join('',@lib_002);}
    		
    elsif((join('',@lib_003) eq join('',@code)) or
         (join('',@lib_003[0..3]) eq join('',@code[0..3])) or
         (join('',@lib_003[1..4]) eq join('',@code[1..4])) or
         (join('',@lib_003[0,1,2,4]) eq join('',@code[0,1,2,4])) or
         (join('',@lib_003[0,2,3,4]) eq join('',@code[0,2,3,4])) or
         (join('',@lib_003[0,1,3,4]) eq join('',@code[0,1,3,4]))) 
    	{$tag=join('',@code);
    	 $closest_tag=join('',@lib_003);}
    
    else
    	{$tag=join('',@code);
    	  $closest_tag='NONE';}

    guest, 10 Декабря 2008

    Комментарии (14)
  2. Perl / Говнокод #60

    −366.4

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    ###
    ### ввод цен на открытки
    ###
    
    if ($p{card}==0) {$o=0}
    if ($p{card}==1) {$o=20}
    if ($p{card}==2) {$o=20}
    if ($p{card}==3) {$o=20}
    if ($p{card}==4) {$o=20}
    if ($p{card}==5) {$o=20}
    if ($p{card}==6) {$o=20}
    if ($p{card}==7) {$o=20}
    if ($p{card}==8) {$o=20}
    if ($p{card}==9) {$o=20}
    if ($p{card}==10) {$o=20}
    if ($p{card}==11) {$o=20}
    if ($p{card}==12) {$o=20}
    if ($p{card}==13) {$o=20}
    if ($p{card}==14) {$o=20}
    if ($p{card}==15) {$o=20}
    if ($p{card}==16) {$o=20}
    if ($p{card}==17) {$o=20}
    if ($p{card}==18) {$o=20}

    guest, 04 Декабря 2008

    Комментарии (7)
  3. Perl / Говнокод #55

    −110.4

    1. 1
    #!/usr/blin/perl

    guest, 04 Декабря 2008

    Комментарии (66)