1. C++ / Говнокод #28432

    −7

    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
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    if (neuronsV.size() >= 8)
    	{
    		auto count = neuronsV.size() - neuronsV.size() % 8;
    
    		__m256* vs = static_cast<__m256*>(alloca(count * sizeof(float) * 3));
    		__m256* ws = vs + count / 8;
    		__m256* ins = ws + count / 8;
    
    		for (int i = 0; i < count / 8; ++i)
    		{
    			vs[i] = _mm256_load_ps(&neuronsV[i * 8]);
    			ws[i] = _mm256_load_ps(&neuronsW[i * 8]);
    			ins[i] = _mm256_load_ps(&neuronsIn[i * 8]);
    		}
    
    		static const __m256 div3 = [](void) -> __m256
    		{
    			float temp[]{ 3.f, 3.f, 3.f, 3.f, 3.f, 3.f, 3.f, 3.f };
    			return _mm256_load_ps(temp);
    		}();
    
    		__m256 iextv = [&iext](void) -> __m256
    		{
    			float temp[]{ iext, iext, iext, iext, iext, iext, iext, iext };
    			return _mm256_load_ps(temp);
    		}();
    
    		__m256 exprdtv = [&dt](void) -> __m256
    		{
    			float temp[]{ expr * dt, expr * dt, expr * dt, expr * dt, expr * dt, expr * dt, expr * dt, expr * dt };
    			return _mm256_load_ps(temp);
    		}();
    
    		static const __m256 av = [](void) -> __m256
    		{
    			float temp[]{ a, a, a, a, a, a, a, a };
    			return _mm256_load_ps(temp);
    		}();
    
    		static const __m256 bv = [](void) -> __m256
    		{
    			float temp[]{ b, b, b, b, b, b, b, b };
    			return _mm256_load_ps(temp);
    		}();
    
    		__m256 thetadt = [&dt](void) -> __m256
    		{
    			float temp[]{ dt / theta, dt / theta, dt / theta, dt / theta, dt / theta, dt / theta, dt / theta, dt / theta };
    			return _mm256_load_ps(temp);
    		}();
    
    		for (int i = 0; i < count / 8; ++i)
    		{
    			// vs += (vs - (vs * vs * vs) / 3.f - ws - iext - ins) * exprdtv
    			__m256 nv = _mm256_mul_ps(vs[i], _mm256_mul_ps(vs[i], vs[i]));
    			nv = _mm256_sub_ps(vs[i], _mm256_div_ps(nv, div3));
    			nv = _mm256_sub_ps(nv, ws[i]);
    			nv = _mm256_add_ps(nv, iextv);
    			nv = _mm256_add_ps(nv, ins[i]);
    			nv = _mm256_mul_ps(nv, exprdtv);
    			vs[i] = _mm256_add_ps(vs[i], nv);
    
    			// ws += (vs - av - ws * bv) * thetadt
    			nv = _mm256_sub_ps(vs[i], av);
    			nv = _mm256_sub_ps(nv, _mm256_mul_ps(ws[i], bv));
    			ws[i] = _mm256_add_ps(ws[i], _mm256_mul_ps(nv, thetadt));
    		}
    
    		for (int i = 0; i < count / 8; ++i)
    		{
    			_mm256_storeu_ps(&neuronsV[i * 8], vs[i]);
    			_mm256_storeu_ps(&neuronsW[i * 8], ws[i]);
    		}
    	}
    
    	// scalar edition
    	for (int i = 0; i < neuronsV.size() % 8; ++i)
    	{
    		auto off = neuronsV.size() - 1 - i;
    		auto& v = neuronsV[off];
    		auto& w = neuronsW[off];
    		auto& in = neuronsIn[off];
    
    		v += (v - (v * v * v) / 3.f - w - iext - in) * expr * dt;
    		w += (v - a - w * b) * dt / theta;
    	}
    
    	std::ranges::fill(neuronsIn, 0.f);

    Царский анрол

    kcalbCube, 31 Октября 2022

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

    0

    1. 1
    2. 2
    3. 3
    main: () -> int = {
       std::cout << "hello world!";
    }

    Война не всех убила..
    https://github.com/hsutter/cppfront

    kcalbCube, 28 Октября 2022

    Комментарии (112)
  3. Assembler / Говнокод #28430

    0

    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
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    91. 91
    92. 92
    93. 93
    94. 94
    95. 95
    96. 96
    97. 97
    98. 98
    99. 99
    includelib  C:\Irvine\User32.Lib
    includelib  C:\Irvine\Kernel32.Lib
    includelib  D:\masm32\lib\Irvine32.lib
    include     \masm32\include\Irvine32.inc
    ; D:/masm32/bin/ml.exe /c  /coff  "D:\asm\simple.asm"
    ; D:/masm32\bin\link.exe /subsystem:console  "D:\asm\simple.obj"
    .data
    X Dword  ? 
    A dword  ? 
    B dword  ?
    M dword  ? 
    .code
    main PROC
    mov eax, 1
    xor ecx , ecx
    xor ebx, ebx
    strt:
    add eax , 1
    mov X, eax
    push eax
    call simple
    cmp ebx, 1
    pop eax
    je ext
    call WriteInt
    call CrLF
    ext:
    
    cmp eax, 50000000
    jb strt
    
    	exit
    main ENDP
    Simple PROC uses ecx
    Mov A, 1
    call Sqrt
    Mov A , eax
    MOV edx , 2
    rn:
    ;push edx
    mov ecx, edx
    
    mov eax , X
    mov ebx, edx
    xor edx ,edx
    div ebx 
    cmp edx, 0
    jne stp
    mov ebx ,1
    jmp var
    stp:
    ;pop edx
    mov edx,ecx
    cmp edx, A
    inc edx
    jb rn
    var:
    ret
    Simple  ENDP
    Sqrt PROC USES ebx
      mov A, 1 ;A = 1
      mov  eax ,X
      push eax
      shr  EAX, 5
      add   EAX , 8
      Mov B , EAX
      pop eax
      cmp B,0FFFFh
      jbe crt
      mov B, 0FFFFh
    crt:;do {
        mov ebx, B 
    	push A
    	add A,ebx
    	shr A, 1
    	mov ebx, A
    	pop A
    	mov M ,ebx
    	mov eax, ebx
    	mul ebx
    	cmp eax , X
        jbe  opt	
    	Mov eax, M
    	dec  eax
    	mov B , eax
    	jmp dz
    	opt:
    	mov eax, M
    	inc  eax
    	mov A , eax
    	dz:
    	mov eax, B
    	cmp eax,A
    	Jae crt
    	mov  eax , A 
    	dec eax
    	ret
    Sqrt  ENDP
     END main

    Лялька для простых чисел )))))))))

    gne4do, 27 Октября 2022

    Комментарии (1)
  4. Python / Говнокод #28427

    0

    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
    #Ввод пользователем шахматной клетки
    chess_cell = input("Введите шахматную клетку ")
     
    horizontal_chess = chess_cell[0] #присовение в переменную буквы клетки
    vertical_chess = int (chess_cell[1]) #присовение в переменную цифры клетки
     
    #Вычисление условий для определения цвета ячейки
    if vertical_chess > 8:
        print ("Число клетки не может быть больше 8! ") #Условие ограничивающее количество клеток по вертикали
     
    elif horizontal_chess != "a" and horizontal_chess != "A" and horizontal_chess != "b" and horizontal_chess != "B"\
    and horizontal_chess != "c" and horizontal_chess != "C" and horizontal_chess != "d" and horizontal_chess != "D"\
    and horizontal_chess != "e" and horizontal_chess != "E" and horizontal_chess != "f" and horizontal_chess != "F"\
    and horizontal_chess != "g" and horizontal_chess != "G" and horizontal_chess != "h" and horizontal_chess != "H":
        print ("такой буквы ячейки не существует!") #Условие ограничивающее количество букв по горизонтали
     
    elif horizontal_chess == "a" or horizontal_chess == "A" or horizontal_chess == "c" or horizontal_chess == "C"\
    or horizontal_chess == "e" or horizontal_chess == "E" or horizontal_chess == "g" or horizontal_chess == "G": 
        if vertical_chess%2 == 1:
            print ("ячейка черная ") 
        else:
            print ("ячейка белая") #определение цвета клеток в вертикали А, C, E, G
     
    elif horizontal_chess == "b" or horizontal_chess == "B"or horizontal_chess == "d" or horizontal_chess == "D"\
    or horizontal_chess == "f" or horizontal_chess == "F" or horizontal_chess == "h" or horizontal_chess == "H": 
        if vertical_chess%2 == 0:
            print ("ячейка черная ") 
        else:
            print ("ячейка белая") #определение цвета клеток в вертикали B, D, F, H

    Определение цвета ячейки шахматной доски. Перевести букву в число с помощью ord()? Не, это мы не проходили.

    govnobot, 26 Октября 2022

    Комментарии (10)
  5. C++ / Говнокод #28426

    −2

    1. 1
    2. 2
    3. 3
    for (int x0 = 0; x0 < layout[static_cast<std::vector<unsigned int, std::allocator<unsigned int>>::size_type>(i) - 1]; ++x0)
    			for (int x1 = 0; x1 < layout[static_cast<std::vector<unsigned int, std::allocator<unsigned int>>::size_type>(i)]; ++x1)
    					...

    implicitбляди соснули.

    kcalbCube, 26 Октября 2022

    Комментарии (8)
  6. C# / Говнокод #28425

    0

    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
    public class Solution 
    {
        public string RemoveStars(string s) 
        {
            char[] str = new char[s.Length];
            int l = 0;
            
            for(int i = 0; i < s.Length; ++i)
                if(s[i] == '*')
                    --l;
                else
                    str[l++] = s[i];
            
            return new string(str, 0, l);
        }
    }

    решил выйти из выгорания изучением новой технологии. литкод оказался прикольной штукой..

    kcalbCube, 23 Октября 2022

    Комментарии (46)
  7. Python / Говнокод #28423

    +1

    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
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    91. 91
    92. 92
    93. 93
    94. 94
    95. 95
    #!/usr/bin/env python3
    # -*- coding: UTF8 -*-
    from datetime import date
    from os import environ, mkdir, system
    from os.path import dirname, exists, join as path_join
    from time import time
    
    
    def check_verbose():
        return environ.get("DEBUG") in ("true", "True", "TRUE", True, "yes", "Yes", "YES")
    
    
    class Timer:
        def __init__(self):
            """
            Объект добавляет в начале текста временные метки
            """
            self.start_epoch = self.last_call = time()
    
        @staticmethod
        def __fully_scope(timer: int or str) -> str:
            """
            Преобразует однозначные значения в двузначные.
            :param timer: Время
            :return: Двузначное значение
            """
            if len(str(timer)) == 2:
                return str(timer)
            elif len(str(timer)) == 1:
                return "0" + str(timer)
            elif len(str(timer)) <= 0:
                return "00"
            elif len(str(timer)) >= 2:
                return str(timer)[:2]
    
        def __formatter(self, timestep: float) -> str:
            """
            Форматирует время
                :return: время hh:mm:ss
            """
            _hours = int(timestep // 3600), int(timestep % 3600)
            _minute = int(_hours[1] // 60), int(_hours[1] % 60)
    
            _current_epoch = f"{self.__fully_scope(_minute[0])}:{self.__fully_scope(_minute[1])}"
            if _hours[0] > 0:
                _current_epoch = f"{_hours[0]}:" + _current_epoch
            return _current_epoch
    
        def __call__(self, fix_call: bool = True) -> str:
            """
            Считает время с начала сценария + с последнего шага
                :return: время hh:mm:ss(+hh:mm:ss)
            """
            current_epoch = self.__formatter(time() - self.start_epoch)
            timedelta_epoch = self.__formatter(time() - self.last_call)
            if fix_call:
                self.last_call = time()
    
            return f"{current_epoch}(+{timedelta_epoch})"
    
        def __bool__(self):
            return True
    
    
    class Logger:
        def __init__(self, name: str):
            self.start_time = time()
            self.name = name.upper()
            self.timer = Timer()
            self.log_file = path_join(environ["RESULT_DIR"], name, f"{name}_{date.today().isoformat()}.log")
    
        def check_file(self):
            if not exists(self.log_file):
                if not exists(dirname(self.log_file)):
                    mkdir(dirname(self.log_file))
                system(f"echo {date.today().isoformat()}> {self.log_file}")
    
        def save_log(self, msg: str):
            self.check_file()
            with open(self.log_file, "a+") as _log_file:
                _log_file.write(msg + "\n")
    
        def massage(self, msg: str):
            print(f"{self.timer()}::{self.name}::{msg}")
            self.check_file()
            self.save_log(f"{self.timer()}::{self.name}::{msg}")
    
        def multi_msg(self, level: str, msg: any):
            if isinstance(msg, (str, int, float, bool)):
                self.massage(f"{level.upper()}::{msg}")
            elif isinstance(msg, (tuple, list, set)):
                for _msg in msg:
                    self.multi_msg(level, _msg)
            elif isinstance(msg, dict):
                for _msg_key in msg:

    Ну собственно самописный логгер, потому что "библиатечный логгер переусложнен НИНАДА!"

    dicklover, 19 Октября 2022

    Комментарии (50)
  8. Python / Говнокод #28422

    −1

    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
    words = ['Broom', 'Being', 'Boring', 'Breeding', 'Dreaming', 'Doing', 'Dancing', 'Drinking',
         'Freezing', 'Falling', 'Flooding', 'Fearing', 'Saying', 'Sleeping', 'Standing',
         'Screaming', 'Running', 'Reading', 'Rolling', 'Rushing', 'Twerking', 'Telling']
    
    def make_rows(row_size: int) -> list:
        row_size = abs(int(row_size)); index = 0; amount = len(words)
        # Найти кол-во групп / Calculate the amount of sublists
        if row_size>amount: row_size=amount
        if row_size > 0:
            subs = (amount // row_size) + 1 if amount % row_size > 0 else amount // row_size
            print(f'Слов: {len(words)} | | Ячеек: {subs}\n')
            # Создать найденное кол-во групп / Create the found amount of sublists
            rows = [[] for i in range(subs)]
            for x in range(amount):
                rows[index].append(words[x])
                if len(rows[index]) == row_size: index += 1
            return rows
        else: return words
            
    print(make_rows(2))

    rockkley94, 19 Октября 2022

    Комментарии (19)
  9. Си / Говнокод #28418

    −2

    1. 1
    int make_program_look_bigger[1000000];

    kcalbCube, 13 Октября 2022

    Комментарии (4)
  10. PHP / Говнокод #28417

    0

    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
    $result5 = dbquery("SELECT MAX(ID) FROM okb_db_itrzadan_statuses where ((ID_edo='".$render_row['ID']."') and (STATUS='Выполнено')) ");
    $name5 = mysql_fetch_row($result5);
    $total5 = $name5[0];
    $result5 = dbquery("SELECT * FROM okb_db_itrzadan_statuses where (ID='".$total5."') ");
    $name5 = mysql_fetch_array($result5);
    $result6 = dbquery("SELECT * FROM okb_db_itrzadan where (ID='".$render_row['ID']."') ");
    $name6 = mysql_fetch_array($result6);
    
    //// дни
    
    if ($name6['DATE_PLAN'][6] == 0) $name6_6 = $name6['DATE_PLAN'][7];
    if ($name6['DATE_PLAN'][6] == 1) $name6_6 = $name6['DATE_PLAN'][7] + 10;
    if ($name6['DATE_PLAN'][6] == 2) $name6_6 = $name6['DATE_PLAN'][7] + 20;
    if ($name6['DATE_PLAN'][6] == 3) $name6_6 = $name6['DATE_PLAN'][7] + 30;
    
    if ($name5['DATA'][6] == 0) $name5_6 = $name5['DATA'][7];
    if ($name5['DATA'][6] == 1) $name5_6 = $name5['DATA'][7] + 10;
    if ($name5['DATA'][6] == 2) $name5_6 = $name5['DATA'][7] + 20;
    if ($name5['DATA'][6] == 3) $name5_6 = $name5['DATA'][7] + 30;
    
    //// мес¤цы
    if ($name6['DATE_PLAN'][5] == 1) $name6_d = 31;
    if ($name6['DATE_PLAN'][5] == 2) $name6_d = 59;
    if ($name6['DATE_PLAN'][5] == 3) $name6_d = 90;
    if ($name6['DATE_PLAN'][5] == 4) $name6_d = 120;
    if ($name6['DATE_PLAN'][5] == 5) $name6_d = 151;
    if ($name6['DATE_PLAN'][5] == 6) $name6_d = 181;
    if ($name6['DATE_PLAN'][5] == 7) $name6_d = 212;
    if ($name6['DATE_PLAN'][5] == 8) $name6_d = 243;
    if ($name6['DATE_PLAN'][5] == 9) $name6_d = 273;
    if (($name6['DATE_PLAN'][5] == 0) and ($name6['DATE_PLAN'][4] == 1)) $name6_d = 304;
    if (($name6['DATE_PLAN'][5] == 1) and ($name6['DATE_PLAN'][4] == 1)) $name6_d = 334;
    if (($name6['DATE_PLAN'][5] == 2) and ($name6['DATE_PLAN'][4] == 1)) $name6_d = 365;
    
    if ($name5['DATA'][5] == 1) $name5_d = 31;
    if ($name5['DATA'][5] == 2) $name5_d = 62;
    if ($name5['DATA'][5] == 3) $name5_d = 90;
    if ($name5['DATA'][5] == 4) $name5_d = 121;
    if ($name5['DATA'][5] == 5) $name5_d = 151;
    if ($name5['DATA'][5] == 6) $name5_d = 182;
    if ($name5['DATA'][5] == 7) $name5_d = 212;
    if ($name5['DATA'][5] == 8) $name5_d = 243;
    if ($name5['DATA'][5] == 9) $name5_d = 274;
    if (($name5['DATA'][5] == 0) and ($name5['DATA'][4] == 1)) $name5_d = 304;
    if (($name5['DATA'][5] == 1) and ($name5['DATA'][4] == 1)) $name5_d = 335;
    if (($name5['DATA'][5] == 2) and ($name5['DATA'][4] == 1)) $name5_d = 365;
    
    //// столетие
    if ($name6['DATE_PLAN'][2] == 0) $name6_2 = $name6['DATE_PLAN'][3];
    if ($name6['DATE_PLAN'][2] == 1) $name6_2 = $name6['DATE_PLAN'][3] + 10;
    if ($name6['DATE_PLAN'][2] == 2) $name6_2 = $name6['DATE_PLAN'][3] + 20;
    if ($name6['DATE_PLAN'][2] == 3) $name6_2 = $name6['DATE_PLAN'][3] + 30;
    if ($name6['DATE_PLAN'][2] == 4) $name6_2 = $name6['DATE_PLAN'][3] + 40;
    if ($name6['DATE_PLAN'][2] == 5) $name6_2 = $name6['DATE_PLAN'][3] + 50;
    if ($name6['DATE_PLAN'][2] == 6) $name6_2 = $name6['DATE_PLAN'][3] + 60;
    if ($name6['DATE_PLAN'][2] == 7) $name6_2 = $name6['DATE_PLAN'][3] + 70;
    if ($name6['DATE_PLAN'][2] == 8) $name6_2 = $name6['DATE_PLAN'][3] + 80;
    if ($name6['DATE_PLAN'][2] == 9) $name6_2 = $name6['DATE_PLAN'][3] + 90;
    
    if ($name5['DATA'][2] == 0) $name5_2 = $name5['DATA'][3];
    if ($name5['DATA'][2] == 1) $name5_2 = $name5['DATA'][3] + 10;
    if ($name5['DATA'][2] == 2) $name5_2 = $name5['DATA'][3] + 20;
    if ($name5['DATA'][2] == 3) $name5_2 = $name5['DATA'][3] + 30;
    if ($name5['DATA'][2] == 4) $name5_2 = $name5['DATA'][3] + 40;
    if ($name5['DATA'][2] == 5) $name5_2 = $name5['DATA'][3] + 50;
    if ($name5['DATA'][2] == 6) $name5_2 = $name5['DATA'][3] + 60;
    if ($name5['DATA'][2] == 7) $name5_2 = $name5['DATA'][3] + 70;
    if ($name5['DATA'][2] == 8) $name5_2 = $name5['DATA'][3] + 80;
    if ($name5['DATA'][2] == 9) $name5_2 = $name5['DATA'][3] + 90;
    
    echo (($name5_6-$name6_6)+($name5_d-$name6_d-1))+($name5_2*365-$name6_2*365)+1;

    kib0rg, 13 Октября 2022

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