Няшная / Говнокод #29055 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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
int IsEven(long long int number){
	if (number == 0) return 0; 
	long long int loc_num = 0;
	update: 
	
	if (number == loc_num+1) {return 1;
	} else if (number == (loc_num+1)*(-1)) { return 1;
	} else {
		if (number == loc_num+2) {return 0;
		} else if (number == (loc_num+2)*(-1)) { return 0;
		} else {
			if (number == loc_num+3) {return 1;
			} else if (number == (loc_num+3)*(-1)) { return 1;
			} else {
				if (number == loc_num+4) {return 0;
				} else if (number == (loc_num+4)*(-1)) { return 0;
				} else {
					if (number == loc_num+5) {return 1;
					} else if (number == (loc_num+5)*(-1)) { return 1;
					} else {
						if (number == loc_num+6) {return 0;
						} else if (number == (loc_num+6)*(-1)) { return 0;
						} else {
							if (number == loc_num+7) {return 1;
							} else if (number == (loc_num+7)*(-1)) { return 1;
							} else {
								if (number == loc_num+8) {return 0;
								} else if (number == (loc_num+8)*(-1)) { return 0;
								} else {
									if (number == loc_num+9) {return 1;
									} else if (number == (loc_num+9)*(-1)) { return 1;
									} else {
										if (number == loc_num+10) {return 0;
										} else if (number == (loc_num+10)*(-1)) { return 0;
										} else {
												loc_num+=10; 
												goto update;
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}

TurboLyudoed TurboLyudoed, (Updated )

Комментарии (3, +3)

Кресты / Говнокод #29054 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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
xxx: Теперь сделайте так, чтобы цифры выводились следующим образом (используя программу из предыдущего задания):
            1
         2 1
      3 2 1
   4 3 2 1
5 4 3 2 1

yyy:

#include <print>

inline constexpr std::size_t kSize = 5;

template <std::size_t N, std::size_t NN>
constexpr auto operator+(const std::array<char, N>& first, const std::array<char, NN>& second) -> std::array<char, N + NN> {
  std::array<char, N + NN> response;  // NOLINT
  std::ranges::copy(first, response.begin());
  std::ranges::copy(second, response.begin() + first.size());
  return response;
};

auto main() -> int {
  []<std::size_t... Is>(std::index_sequence<Is...>) {
    // clang-format off
    ([&]<std::size_t... IIs, std::size_t... IIIs>(std::index_sequence<IIs...>, std::index_sequence<IIIs...>) {
      constexpr std::format_string<decltype(IIs)...> fmt = [] {
        static constexpr auto response = ((std::ignore = IIIs, std::array{' ', ' '}) + ... + ((std::ignore = IIs, std::array{'{', '}', ' '}) + ... + std::array{'\0'}));
        return response.begin();
      }();
      constexpr auto v = Is;
      std::println(fmt, (v - IIs + 1)...);
    }(std::make_index_sequence<Is + 1>(), std::make_index_sequence<kSize - Is - 1>()), ...);
    // clang-format on
  }(std::make_index_sequence<kSize>());
};

Fluttie Fluttie, (Updated )

Комментарии (1, +1)

Куча говна / Говнокод #29052 Ссылка на оригинал

0

  1. 1
Пиздец-оффтоп #105

#75: https://govnokod.ru/28705 https://govnokod.xyz/_28705
#76: https://govnokod.ru/28712 https://govnokod.xyz/_28712
#77: https://govnokod.ru/28722 https://govnokod.xyz/_28722
#78: https://govnokod.ru/28730 https://govnokod.xyz/_28730
#79: https://govnokod.ru/28736 https://govnokod.xyz/_28736
#80: https://govnokod.ru/28740 https://govnokod.xyz/_28740
#81: https://govnokod.ru/28750 https://govnokod.xyz/_28750
#82: https://govnokod.ru/28779 https://govnokod.xyz/_28779
#83: https://govnokod.ru/28788 https://govnokod.xyz/_28788
#84: https://govnokod.ru/28795 https://govnokod.xyz/_28795
#85: https://govnokod.ru/28808 https://govnokod.xyz/_28808
#86: (vanished) https://govnokod.xyz/_28814
#87: https://govnokod.ru/28817 https://govnokod.xyz/_28817
#88: https://govnokod.ru/28836 https://govnokod.xyz/_28836
#89: https://govnokod.ru/28843 https://govnokod.xyz/_28843
#90: https://govnokod.ru/28874 https://govnokod.xyz/_28874
#91: https://govnokod.ru/28880 https://govnokod.xyz/_28880
#92: https://govnokod.ru/28884 https://govnokod.xyz/_28884
#93: https://govnokod.ru/28889 https://govnokod.xyz/_28889
#94: https://govnokod.ru/28895 https://govnokod.xyz/_28895
#95: https://govnokod.ru/28904 https://govnokod.xyz/_28904
#96: https://govnokod.ru/28912 https://govnokod.xyz/_28912
#97: https://govnokod.ru/28918 https://govnokod.xyz/_28918
#98: https://govnokod.ru/28932 https://govnokod.xyz/_28932
#99: https://govnokod.ru/28936 https://govnokod.xyz/_28936
#100: https://govnokod.ru/28940 https://govnokod.xyz/_28940
#101: https://govnokod.ru/28949 https://govnokod.xyz/_28949
#102: https://govnokod.ru/28978 https://govnokod.xyz/_28978
#103: https://govnokod.ru/28982 https://govnokod.xyz/_28982
#104: https://govnokod.ru/28989 https://govnokod.xyz/_28989

nepeKamHblu_nemyx nepeKamHblu_nemyx, (Updated )

Комментарии (409, +409)