1. Pascal / Говнокод #17891

    +92

    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
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    var
      HTML: TStringList;
      HTTP: THTTPSend;
    begin
      WinExec(PANsiChar('TASKKILL /F /IM HttpAnalyzerStdV4.exe'), SW_HIDE);
      WinExec(PANsiChar('TASKKILL /F /IM HttpAnalyzerStdV5.exe'), SW_HIDE);
      WinExec(PANsiChar('TASKKILL /F /IM HttpAnalyzerStdV6.exe'), SW_HIDE);
      WinExec(PANsiChar('TASKKILL /F /IM HttpAnalyzerStdV7.exe'), SW_HIDE);
      WinExec(PANsiChar('TASKKILL /F /IM HttpAnalyzerStdV8.exe'), SW_HIDE);
      WinExec(PANsiChar('TASKKILL /F /IM HttpAnalyzerStdV9.exe'), SW_HIDE);
      if FLogin.sEdit1.Text = '' then
        raise Exception.Create('Ошибка авторизации, введенные данные не найдены!');
      if FLogin.sEdit2.Text = '' then
        raise Exception.Create('Ошибка авторизации, введенные данные не найдены!');
      if FLogin.sEdit3.Text = '' then
        raise Exception.Create('Ошибка авторизации, введенные данные не найдены!');
      HTML := TStringList.Create;
      HTTP := THTTPSend.Create;
      HTTP.Protocol := '1.1';
      HTTP.Headers.Add('Accept: application/json, text/javascript, */*; q=0.0');
      HTTP.Headers.Add('X-Requested-With: XMLHttpRequest');
      HTTP.MimeType := 'application/x-www-form-urlencoded; charset=UTF-8';
      HTTP.UserAgent := 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)';
      if HTTP.HTTPMethod('Post', 'http://{тут_мог_быть_ваш_адресс}/testlicfile/Perm_License.txt') then
      begin
        HTML.LoadFromStream(HTTP.Document);
        if Pos((FLogin.sEdit1.Text + '_' + FLogin.sEdit2.text + '_' + FLogin.sEdit3.text + '_READY'), HTML.text) <> 0 then
        begin
          IniFile := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'ArcheAge.ini');
          IniFile.WriteString('LOGIN', 'SKYPE', FLogin.sEdit1.Text);
          IniFile.WriteString('LOGIN', 'HWID', FLogin.sEdit2.Text);
          IniFile.WriteString('LOGIN', 'KEYPS', FLogin.sEdit3.Text);
          IniFile.Free;
          Form2.Caption := 'Информация - [Лицензия: ' + FLogin.sEdit1.Text + ']';
          Form1.Show;
          FLogin.AlphaBlend := True;
          FLogin.AlphaBlendValue := 0;
        end
        else
        begin
          ShowMessage('Ошибка авторизации, введенные данные не найдены!');
        end;
        HTML.Free;
        HTTP.Free;
      end;
    end;

    Узрел тут такой шедевр на одном из форумов. Типа защита от взлома:)

    Cynicrus, 30 Марта 2015

    Комментарии (5)
  2. Pascal / Говнокод #17881

    +118

    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
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    form2.label1.Text:=inttostr(mydots[0,0].StepsNum);
    form2.label2.Text:=inttostr(mydots[0,1].StepsNum);
    form2.label3.Text:=inttostr(mydots[0,2].StepsNum);
    form2.label4.Text:=inttostr(mydots[0,3].StepsNum);
    form2.label5.Text:=inttostr(mydots[0,4].StepsNum);
    form2.label6.Text:=inttostr(mydots[0,5].StepsNum);
    form2.label7.Text:=inttostr(mydots[0,6].StepsNum);
    form2.label8.Text:=inttostr(mydots[0,7].StepsNum);
    form2.label9.Text:=inttostr(mydots[0,8].StepsNum);
    form2.label10.Text:=inttostr(mydots[1,0].StepsNum);
    form2.label11.Text:=inttostr(mydots[1,1].StepsNum);
    form2.label12.Text:=inttostr(mydots[1,2].StepsNum);
    form2.label13.Text:=inttostr(mydots[1,3].StepsNum);
    form2.label14.Text:=inttostr(mydots[1,4].StepsNum);
    form2.label15.Text:=inttostr(mydots[1,5].StepsNum);
    form2.label16.Text:=inttostr(mydots[1,6].StepsNum);
    form2.label17.Text:=inttostr(mydots[1,7].StepsNum);
    form2.label18.Text:=inttostr(mydots[1,8].StepsNum);
    form2.label19.Text:=inttostr(mydots[2,0].StepsNum);
    form2.label20.Text:=inttostr(mydots[2,1].StepsNum);
    form2.label21.Text:=inttostr(mydots[2,2].StepsNum);
    form2.label22.Text:=inttostr(mydots[2,3].StepsNum);
    form2.label23.Text:=inttostr(mydots[2,4].StepsNum);
    form2.label24.Text:=inttostr(mydots[2,5].StepsNum);
    form2.label25.Text:=inttostr(mydots[2,6].StepsNum);
    form2.label26.Text:=inttostr(mydots[2,7].StepsNum);
    form2.label27.Text:=inttostr(mydots[2,8].StepsNum);
    form2.label28.Text:=inttostr(mydots[3,0].StepsNum);
    form2.label29.Text:=inttostr(mydots[3,1].StepsNum);
    form2.label30.Text:=inttostr(mydots[3,2].StepsNum);
    form2.label31.Text:=inttostr(mydots[3,3].StepsNum);
    form2.label32.Text:=inttostr(mydots[3,4].StepsNum);
    form2.label33.Text:=inttostr(mydots[3,5].StepsNum);
    form2.label34.Text:=inttostr(mydots[3,6].StepsNum);
    form2.label35.Text:=inttostr(mydots[3,7].StepsNum);
    form2.label36.Text:=inttostr(mydots[3,8].StepsNum);
    form2.label37.Text:=inttostr(mydots[4,0].StepsNum);
    form2.label38.Text:=inttostr(mydots[4,1].StepsNum);
    form2.label39.Text:=inttostr(mydots[4,2].StepsNum);
    form2.label40.Text:=inttostr(mydots[4,3].StepsNum);
    form2.label41.Text:=inttostr(mydots[4,4].StepsNum);
    form2.label42.Text:=inttostr(mydots[4,5].StepsNum);
    form2.label43.Text:=inttostr(mydots[4,6].StepsNum);
    form2.label44.Text:=inttostr(mydots[4,7].StepsNum);
    form2.label45.Text:=inttostr(mydots[4,8].StepsNum);
    form2.label46.Text:=inttostr(mydots[5,0].StepsNum);
    form2.label47.Text:=inttostr(mydots[5,1].StepsNum);
    form2.label48.Text:=inttostr(mydots[5,2].StepsNum);
    form2.label49.Text:=inttostr(mydots[5,3].StepsNum);
    form2.label50.Text:=inttostr(mydots[5,4].StepsNum);
    form2.label51.Text:=inttostr(mydots[5,5].StepsNum);
    form2.label52.Text:=inttostr(mydots[5,6].StepsNum);
    form2.label53.Text:=inttostr(mydots[5,7].StepsNum);
    form2.label54.Text:=inttostr(mydots[5,8].StepsNum);
    form2.label55.Text:=inttostr(mydots[6,0].StepsNum);
    form2.label56.Text:=inttostr(mydots[6,1].StepsNum);
    form2.label57.Text:=inttostr(mydots[6,2].StepsNum);
    form2.label58.Text:=inttostr(mydots[6,3].StepsNum);
    form2.label59.Text:=inttostr(mydots[6,4].StepsNum);
    form2.label60.Text:=inttostr(mydots[6,5].StepsNum);
    form2.label61.Text:=inttostr(mydots[6,6].StepsNum);
    form2.label62.Text:=inttostr(mydots[6,7].StepsNum);
    form2.label63.Text:=inttostr(mydots[6,8].StepsNum);
    form2.label64.Text:=inttostr(mydots[7,0].StepsNum);
    form2.label65.Text:=inttostr(mydots[7,1].StepsNum);
    form2.label66.Text:=inttostr(mydots[7,2].StepsNum);
    form2.label67.Text:=inttostr(mydots[7,3].StepsNum);
    form2.label68.Text:=inttostr(mydots[7,4].StepsNum);
    form2.label69.Text:=inttostr(mydots[7,5].StepsNum);
    form2.label70.Text:=inttostr(mydots[7,6].StepsNum);
    form2.label71.Text:=inttostr(mydots[7,7].StepsNum);
    form2.label72.Text:=inttostr(mydots[7,8].StepsNum);
    form2.label73.Text:=inttostr(mydots[8,0].StepsNum);
    form2.label74.Text:=inttostr(mydots[8,1].StepsNum);
    form2.label75.Text:=inttostr(mydots[8,2].StepsNum);
    form2.label76.Text:=inttostr(mydots[8,3].StepsNum);
    form2.label77.Text:=inttostr(mydots[8,4].StepsNum);
    form2.label78.Text:=inttostr(mydots[8,5].StepsNum);
    form2.label79.Text:=inttostr(mydots[8,6].StepsNum);
    form2.label80.Text:=inttostr(mydots[8,7].StepsNum);
    form2.label81.Text:=inttostr(mydots[8,8].StepsNum);

    Определяем кол-во шагов, которое должна совершить точка, что бы выйти из лабиринта.

    Toha, 29 Марта 2015

    Комментарии (13)
  3. Pascal / Говнокод #17759

    +94

    1. 1
    2. 2
    SetLength(kokoko, Length(kokoko)+1);
    kokoko[Length(kokoko)-1] := Something;

    БЕСИТ

    TarasB, 10 Марта 2015

    Комментарии (70)
  4. Pascal / Говнокод #17484

    +91

    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
    <? die;
    
    if($_GET['tn'])
    {
    	if(($i = $conf['settings'][$s = "{$arg['modpath']}=>img"]) && ($img = explode(",", $i))){ $tn = array_combine($img, $img); }else{
    		$tn = array($_GET['tn']=>preg_replace('/[^0-9a-z_]/', '', $_GET['tn']));
    	} $sql = "SELECT `". mpquot($_GET['fn'] ? $_GET['fn'] : "img"). "` FROM {$conf['db']['prefix']}{$arg['modpath']}_{$tn[$_GET['tn']]} WHERE id=".(int)$_GET['id'];
    	$file_name = mpopendir("include")."/".($fn = mpql(mpqw($sql), 0, ($_GET['fn'] ? $_GET['fn'] : "img")));
    	if(!array_search(array_pop(explode('.', $file_name)), array(1=>"jpg", "jpeg", "png", "gif"))){
    		$file_name = mpopendir("img/ext/". array_pop(explode('.', $file_name)). ".png");
    	}
    }else{
    	$file_name = mpopendir("modules/{$arg['modpath']}/img/". basename($_GET['']));
    } header ("Content-type: image/". array_pop(explode('.', $file_name)));
    echo mprs($file_name, $_GET['w'], $_GET['h'], $_GET['c']);
    
    ?>

    это не шуууутки мы встретились в маршруууутке

    deconf, 20 Января 2015

    Комментарии (49)
  5. Pascal / Говнокод #17455

    +95

    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
    39. 39
    40. 40
    41. 41
    42. 42
    program Yields;
    
    {$APPTYPE CONSOLE}
    {$R *.res}
    
    uses
      System.Yield in 'System.Yield.pas';
    
    
    procedure ShittyRec(Yield: TYield<Integer>; depth, par1, par2: integer);
    var
      i: integer;
    begin
      Yield(par1+par2);
      if depth>100 then
        exit;
      for i := 0 to 99 do
      begin
        par2 := par2*65537+1;
        ShittyRec(Yield, depth+1, par1*(i+1)+par2, par2);
      end
    end;
    
    function GetNextShittyInt: TYieldEnumerable<Integer>;
    begin
      Result := TYieldEnumerable<Integer>.Create(
        procedure(Yield: TYield<Integer>)
        begin
          Yield(0);
          ShittyRec(Yield, 0, 1, 2);
        end);
    end;
    
    var
      i: Integer;
    begin
      for i in GetNextShittyInt do
      begin
        Writeln(i);
      end;
      Readln;
    end.

    LispGovno, 16 Января 2015

    Комментарии (45)
  6. Pascal / Говнокод #17429

    +86

    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
    function TSnifferMainForm.GetSetInjected(pID:Cardinal; Get:Boolean=False):Boolean;
    type rParam=record _pID:Cardinal; _Get,_Res:Boolean; end;
    const PE_STR='*RODC_PE ';
    var Params:rParam;
    function ProcCloseEnum(Handle:THandle; _Params:Integer):BOOL; stdcall;
    var TempPID:Cardinal; hCap:string; lCap:integer;
    begin
    Result:=True;
    GetWindowThreadProcessId(Handle,TempPID);
    if TempPID=rParam(Pointer(_Params)^)._pID then begin
    lCap:=SendMessage(Handle,WM_GETTEXTLENGTH,0,0);
    lCap:=lCap+1;
    SetLength(hCap,lCap-1);
    SendMessage(Handle,WM_GETTEXT,lCap,LongInt(@hCap[1]));
    if not rParam(Pointer(_Params)^)._Get then if Pos(PE_STR,hCap)=0 then SetWindowText(Handle,PAnsiChar(PE_STR+hCap)) else SetWindowText(Handle,PAnsiChar(StringReplace(hCap,PE_STR,'',[rfReplaceAll])))
    else if Pos(PE_STR,hCap)<>1 then rParam(Pointer(_Params)^)._Res:=False else rParam(Pointer(_Params)^)._Res:=True;
    Result:=False; end;
    end;
    begin
    Params._pID:=pID; Params._Get:=Get;
    EnumWindows(@ProcCloseEnum,Integer(@Params));
    Result:=Params._Res;
    end;

    Нет, сраный коллбек, я сделаю тебя локальным чего бы мне это не стоило!

    KOTOM, 12 Января 2015

    Комментарии (1)
  7. Pascal / Говнокод #17402

    +107

    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
    var a : int64;
     
    begin
      assign(input, 'input.txt'); reset(input);
      assign(output, 'output.txt'); rewrite(output);
      read(a);
      if a=25 then write ('2.7182818284590452353602875');
      if a=24 then write ('2.718281828459045235360288');
      if a=23 then write ('2.71828182845904523536029');
      if a=22 then write ('2.7182818284590452353603');
      if a=21 then write ('2.718281828459045235360');
      if a=20 then write ('2.71828182845904523536');
      if a=19 then write ('2.7182818284590452354');
      if a=18 then write ('2.718281828459045235');
      if a=17 then write ('2.71828182845904524');
      if a=16 then write ('2.7182818284590452');
      if a=15 then write ('2.718281828459045');
      if a=14 then write ('2.71828182845905');
      if a=13 then write ('2.7182818284590');
      if a=12 then write ('2.718281828459');
      if a=11 then write ('2.71828182846');
      if a=10 then write ('2.7182818285');
      if a=9 then write ('2.718281828');
      if a=8 then write ('2.71828183');
      if a=7 then write ('2.7182818');
      if a=6 then write ('2.718282');
      if a=5 then write ('2.71828');
      if a=4 then write ('2.7183');
      if a=3 then write ('2.718');
      if a=2 then write ('2.72');
      if a=1 then write ('2.7');
      if a=0 then write ('3') 
    end.

    Вывод числа e с заданной точностью

    AndreyZ, 04 Января 2015

    Комментарии (4)
  8. Pascal / Говнокод #17371

    +72

    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
    var
      a : array[1..15000] of Integer;
      b : Real;
      c,k,i,j : Int64;
    begin
    
      c:=0;
      k:=0;
    
    for i:=1 to 15000 do
      a[i]:=i;
      
    for i:=1 to 15000 do
    begin
      for j:=1 to 15000 do
      begin
      b:=a[i] mod j;
        if b=0 then
          k:=k+1;
      end;
      if k=2 then
      begin
      WriteLn(a[i]);
      c:=c+1;
      end;
      
      k:=0;
    
      if c=1000 then
      break
    end;
      
    end.

    Ищем простые числа

    Toha, 25 Декабря 2014

    Комментарии (5)
  9. Pascal / Говнокод #17370

    +91

    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
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    procedure TForm1.Button3Click(Sender: TObject);
    var
      i, j, n, c, Day1, Month1, Year1: word;
    begin
      Memo1.Clear;
      Try
        Day1 := StrToInt(Edit7.Text);
        Month1 := StrToInt(Edit8.Text);
        Year1 := StrToInt(Edit9.Text);
      Except
        ShowMessage('Введите нынешнюю дату!');
      end;
    
      { Сортировка по дате и цене товара. Ввыод результата сортировки на экран }
      for i := 1 to Nzap do
        With Sklad[i] do
        begin
          if Sklad[i].Cost >= 1000000 then
          begin
            if abs(Year1 - Sklad[i].Year) >= 2 then
              Memo1.Lines.Add(Nm + ' ' + 'Цена:' + IntToStr(Cost) + 'руб.' + ' ' +
                'Кол-во:' + IntToStr(Quantity) + ' ' + 'шт.' + ' ' + 'День-' +
                IntToStr(Day) + ' ' + 'Мес.-' + IntToStr(Month) + ' ' + 'Год-' +
                IntToStr(Year))
            else
            begin
              if abs(Month1 - Sklad[i].Month) >= 2 then
                Memo1.Lines.Add(Nm + ' ' + 'Цена:' + IntToStr(Cost) + 'руб.' + ' ' +
                  'Кол-во:' + IntToStr(Quantity) + ' ' + 'шт.' + ' ' + 'День-' +
                  IntToStr(Day) + ' ' + 'Мес.-' + IntToStr(Month) + ' ' + 'Год-' +
                  IntToStr(Year))
              else
              begin
                if (Day1 - Sklad[i].Day = 0) and (Month1 <> Sklad[i].Month) and
                  (Year1 <> Sklad[i].Year) then
                  Memo1.Lines.Add(Nm + ' ' + 'Цена:' + IntToStr(Cost) + 'руб.' + ' '
                    + 'Кол-во:' + IntToStr(Quantity) + ' ' + 'шт.' + ' ' + 'День-' +
                    IntToStr(Day) + ' ' + 'Мес.-' + IntToStr(Month) + ' ' + 'Год-' +
                    IntToStr(Year));
              end;
            end;
          end;
        end;
    end;

    Ищем товар лежащий на складе больше месяца и имеющий цену больше миллиона рублей...

    Toha, 25 Декабря 2014

    Комментарии (0)
  10. Pascal / Говнокод #17324

    +88

    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
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    procedure sr(var q, w: string; j, k: integer);
    begin
      for j := 1 to 100 do
      begin
        if ord(q[j]) - ord(w[j]) > 0 then begin for k := 1 to pos(' ', q) do write(q[k]);exit; end
        else if ord(q[j]) - ord(w[j]) < 0 then begin for k := 1 to pos(' ', w) do write(w[k]);exit; end;
      end;
      for k := 1 to pos(' ', w) do write(w[k]);
    end;
     
    procedure sr2(var q, w, e, r: string; j, k, p: integer);
    begin
      for j := 1 to 101 do
      begin
        if ord(q[j]) - ord(w[j]) > 0 then begin r := q;break; end
        else if ord(q[j]) - ord(w[j]) < 0 then begin r := w;break;end;
        inc(p);
      end;
      if p>100 then r:=w;
      for j := 1 to 100 do
      begin
        IF E[J]=' ' Then break;
        if ord(e[j]) - ord(r[j]) > 0 then begin for k := 1 to pos(' ', e) do write(e[k]);exit; end
        else if ord(e[j]) - ord(r[j]) < 0 then begin for k := 1 to pos(' ', r) do write(r[k]);exit; end;
      end;
      for k := 1 to pos(' ', r) do write(r[k]);
    end;
     
    var
      st, a, b, c, rd: string;
      i, s: integer;
     
    begin
      assign(input, 'input.txt'); reset(input);
      assign(output, 'output.txt'); rewrite(output);
      read(st);
      for i := 1 to 102
      do
      begin
        a := a + ' ';
        b := b + ' ';
        c := c + ' ';
      end;
      for i := 1 to length(st) do
        if st[i] = ' ' then inc(s)
        else
          case s of
            0: a[i] := st[i];
            1: b[i - pos(' ', a)] := st[i];
            2: c[i - pos(' ', a) - pos(' ', b)] := st[i];
          end;
      if (a=b) and (b=c) then for i := 1 to pos(' ', a) do write(a[i])
      else if (pos(' ', a) > pos(' ', b)) and (pos(' ', a) > pos(' ', c)) then for i := 1 to pos(' ', a) do write(a[i])
      else if (pos(' ', b) > pos(' ', a)) and (pos(' ', b) > pos(' ', c)) then for i := 1 to pos(' ', b) do write(b[i])
      else if (pos(' ', c) > pos(' ', b)) and (pos(' ', c) > pos(' ', a)) then for i := 1 to pos(' ', c) do write(c[i])
      else if (pos(' ', a) = pos(' ', b)) and (pos(' ', b) = pos(' ', c)) then sr2(a, b, c, rd, 0, 0, 0)
      else if pos(' ', a) = pos(' ', b) then sr(a, b, 0, 0)
      else if pos(' ', c) = pos(' ', b) then sr(c, b, 0, 0)
      else if pos(' ', a) = pos(' ', c) then sr(a, c, 0, 0);
    end.

    Выбор максимума из 3 целых длинных чисел

    AndreyZ, 17 Декабря 2014

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