Skip to content

Latest commit

 

History

History
164 lines (146 loc) · 29 KB

File metadata and controls

164 lines (146 loc) · 29 KB

My solutions to Codewars challenges - programmed in Pascal.

Blaise Pascal Niklaus Wirth Powered By Lazarus
Blaise Pascal Niklaus Wirth Lazarus IDE

badge


A word of warning

If you really want to learn Pascal and improve through the challenges, don't just copy my solutions. You won't learn anything that way! (Cheating and plagiarizing is not permitted on the Codewars website. Violators will face account suspension or ban.)


My solutions to some Codewars challenges, programmed in Pascal, might not be the most sophisticated, but at least mostly easy to read and understand.

Current Pascal rank (since March 31, 2026): 4 kyu.


See also:


!! Security Notice !!

The code I released here into the public domain may appear in third-party projects. I do not maintain, endorse, or have any affiliation with such projects. Any malicious or deceptive use is unauthorized and should be reported to the hosting platform.


List of all challenges I solved in Pascal

  1. <2 kyu> Evaluate mathematical expression - Solution: eval_math_expression_unit.pas
  2. <4 kyu> Getting along with Integer Partitions - Solution: integer_partitions_unit.pas
  3. <4 kyu> Magnet particules in boxes - Solution: magnet_particules_unit.pas
  4. <4 kyu> Matrix Determinant - Solution: matrix_determinant_unit.pas
  5. <4 kyu> Strings Mix - Solution: strings_mix_unit.pas
  6. <4 kyu> Sum by Factors - Solution: sum_by_factors_unit.pas
  7. <4 kyu> Twice linear - Solution: twice_linear_unit.pas
  8. <5 kyu> Best travel - Solution: best_travel_unit.pas
  9. <5 kyu> Buddy Pairs - Solution: buddy_pairs_unit.pas
  10. <5 kyu> Closest and Smallest - Solution: closest_and_smallest_unit.pas
  11. <5 kyu> Consecutive k-Primes - Solution: consecutive_k_primes_unit.pas
  12. <5 kyu> Decimal to Factorial and Back - Solution: decimal_to_factorial_and_back_unit.pas
  13. <5 kyu> Diophantine Equation - Solution: diophantine_equation_unit.pas
  14. <5 kyu> Directions Reduction - Solution: directions_reduction_unit.pas
  15. <5 kyu> Euler's method for a first-order ODE - Solution: eulers_method_1st_order_ode_unit.pas
  16. <5 kyu> Fibo akin - Solution: fibo_akin_unit.pas
  17. <5 kyu> Find the smallest - Solution: find_the_smallest_unit.pas
  18. <5 kyu> Gap in Primes - Solution: gap_in_primes_unit.pas
  19. <5 kyu> Getting along with Bernoulli's numbers - Solution: getting_along_with_bernoulli_numbers_unit.pas
  20. <5 kyu> Integers: Recreation One - Solution: integers_recreation_one_unit.pas
  21. <5 kyu> Is my friend cheating? - Solution: is_my_friend_cheating_unit.pas
  22. <5 kyu> John and Ann sign up for Codewars - Solution: john_and_ann_sign_up_for_codewars_unit.pas
  23. <5 kyu> k-Primes - Solution: k_primes_unit.pas
  24. <5 kyu> Matching And Substituting - Solution: matching_and_substituting_unit.pas
  25. <5 kyu> Operations on sequences - Solution: operations_on_sequences_unit.pas
  26. <5 kyu> Phone Directory - Solution: phone_directory_unit.pas
  27. <5 kyu> Sections - Solution: sections_unit.pas
  28. <5 kyu> Some Egyptian fractions - Solution: some_egyptian_fractions_unit.pas
  29. <5 kyu> Weight for weight - Solution: weight_for_weight_unit.pas
  30. <5 kyu> Which x for that sum? - Solution: which_x_for_that_sum_unit.pas
  31. <6 kyu> 1/n-Cycle - Solution: one_div_n_cycle_unit.pas
  32. <6 kyu> A disguised sequence (I) - Solution: disguised_sequence_1_unit.pas
  33. <6 kyu> Architect's Dream: drawing curves, observing, thinking - Solution: architects_dream_unit.pas
  34. <6 kyu> Are they the "same"? - Solution: same_arrays_unit.pas
  35. <6 kyu> A Rule of Divisibility by 13 - Solution: divisibility_by_thirteen_unit.pas
  36. <6 kyu> ASCII Fun #1: X-Shape - Solution: x_shape_unit.pas
  37. <6 kyu> Backwards Read Primes - Solution: backwards_read_primes_unit.pas
  38. <6 kyu> Ball Upwards - Solution: ball_upwards_unit.pas
  39. <6 kyu> Banker's Plan - Solution: bankers_plan_unit.pas
  40. <6 kyu> Binaries - Solution: binaries_unit.pas
  41. <6 kyu> Bonuses - Solution: bonuses_unit.pas
  42. <6 kyu> Bouncing Balls - Solution: bouncing_balls_unit.pas
  43. <6 kyu> Braking well - Solution: braking_well_unit.pas
  44. <6 kyu> Build a pile of Cubes - Solution: pile_of_cubes_unit.pas
  45. <6 kyu> Buying a car - Solution: buying_a_car_unit.pas
  46. <6 kyu> Cancellable Item Transactions - Solution: cancellable_item_transactions_unit.pas
  47. <6 kyu> Catalog - Solution: catalog_unit.pas
  48. <6 kyu> Chaser's schedule - Solution: chasers_schedule_unit.pas
  49. <6 kyu> Color Choice - Solution: color_choice_unit.pas
  50. <6 kyu> Consecutive strings - Solution: consecutive_strings_unit.pas
  51. <6 kyu> Cuckoo Clock - Solution: cuckoo_clock_unit.pas
  52. <6 kyu> Disease Spread - Solution: disease_spread_unit.pas
  53. <6 kyu> Disguised sequences (II) - Solution: disguised_sequences_2_unit.pas
  54. <6 kyu> Ease the StockBroker - Solution: ease_the_stockbroker_unit.pas
  55. <6 kyu> Easy Balance Checking - Solution: easy_balance_checking_unit.pas
  56. <6 kyu> Easy Diagonal - Solution: easy_diagonal_unit.pas
  57. <6 kyu> Errors : histogram - Solution: errors_histogram_unit.pas
  58. <6 kyu> Experimenting with a sequence of complex numbers - Solution: sequence_complex_numbers_unit.pas
  59. <6 kyu> Financing a purchase - Solution: financing_purchase_unit.pas
  60. <6 kyu> Financing Plan on Planet XY140Z-n - Solution: planet_financing_plan_unit.pas
  61. <6 kyu> Find the odd int - Solution: find_the_odd_int_unit.pas
  62. <6 kyu> Floating-point Approximation (I) - Solution: floating_point_approx_1_unit.pas
  63. <6 kyu> Floating-point Approximation (II) - Solution: floating_point_approx_2_unit.pas
  64. <6 kyu> Help the bookseller ! - Solution: help_the_bookseller_unit.pas
  65. <6 kyu> Hidden "Cubic" numbers - Solution: hidden_cubic_numbers_unit.pas
  66. <6 kyu> How Much? - Solution: how_much_unit.pas
  67. <6 kyu> Magnitude - Solution: magnitude_unit.pas
  68. <6 kyu> Meeting - Solution: meeting_unit.pas
  69. <6 kyu> Moduli number system - Solution: moduli_number_system_unit.pas
  70. <6 kyu> Moves in squared strings (II) - Solution: moves_in_squared_strings_2_unit.pas
  71. <6 kyu> Moves in squared strings (III) - Solution: moves_in_squared_strings_3_unit.pas
  72. <6 kyu> Parabolic Arc Length - Solution: parabolic_arc_length_unit.pas
  73. <6 kyu> Persistent Bugger. - Solution: persistent_bugger_unit.pas
  74. <6 kyu> Playing on a chessboard - Solution: playing_on_a_chessboard_unit.pas
  75. <6 kyu> Playing with digits - Solution: playing_with_digits_unit.pas
  76. <6 kyu> Playing with passphrases - Solution: playing_with_passphrases_unit.pas
  77. <6 kyu> Positions Average - Solution: positions_average_unit.pas
  78. <6 kyu> Prize Draw - Solution: prize_draw_unit.pas
  79. <6 kyu> Rainfall - Solution: rainfall_unit.pas
  80. <6 kyu> Ranking NBA teams - Solution: ranking_nba_teams_unit.pas
  81. <6 kyu> Rectangle into Squares - Solution: rectangle_into_squares_unit.pas
  82. <6 kyu> Reducing by steps - Solution: reducing_by_steps_unit.pas
  83. <6 kyu> Reverse or rotate? - Solution: reverse_or_rotate_unit.pas
  84. <6 kyu> Reversing a Process - Solution: reversing_a_process_unit.pas
  85. <6 kyu> Salesman's Travel - Solution: salesmans_travel_unit.pas
  86. <6 kyu> Simpson's Rule - Approximate Integration - Solution: simpsons_rule_unit.pas
  87. <6 kyu> Statistics for an Athletic Association - Solution: athletic_association_statistics_unit.pas
  88. <6 kyu> Steps in k-primes - Solution: steps_in_k_primes_unit.pas
  89. <6 kyu> Steps in Primes - Solution: steps_in_primes_unit.pas
  90. <6 kyu> Tank Truck - Solution: tank_truck_unit.pas
  91. <6 kyu> Texting with an old-school mobile phone - Solution: old_school_texting_unit.pas
  92. <6 kyu> The latest clock - Solution: the_latest_clock_unit.pas
  93. <6 kyu> The Walker - Solution: the_walker_unit.pas
  94. <6 kyu> Tortoise racing - Solution: tortoise_racing_unit.pas
  95. <6 kyu> Train your skills in creation of classes - Solution: class_creation_skills_unit.pas
  96. <6 kyu> up AND down - Solution: up_and_down_unit.pas
  97. <6 kyu> Which are in? - Solution: which_are_in_unit.pas
  98. <7 kyu> A Rule of Divisibility by 7 - Solution: divisibility_by_seven_unit.pas
  99. <7 kyu> Cats and shelves - Solution: cats_and_shelves_unit.pas
  100. <7 kyu> Count the Digit - Solution: count_the_digit_unit.pas
  101. <7 kyu> Drying Potatoes - Solution: drying_potatoes_unit.pas
  102. <7 kyu> Easy wallpaper - Solution: easy_wallpaper_unit.pas
  103. <7 kyu> Floating-point Approximation (III) - Solution: floating_point_approx_3_unit.pas
  104. <7 kyu> Going to the cinema - Solution: going_to_the_cinema_unit.pas
  105. <7 kyu> How Green Is My Valley? - Solution: how_green_is_my_valley_unit.pas
  106. <7 kyu> Leap Years - Solution: leap_years_unit.pas
  107. <7 kyu> Looking for a benefactor - Solution: new_average_unit.pas
  108. <7 kyu> Maximum Multiple - Solution: maximum_multiple_unit.pas
  109. <7 kyu> Moves in squared strings (I) - Solution: moves_in_squared_strings_1_unit.pas
  110. <7 kyu> Palindrome chain length - Solution: palindrome_chain_length_unit.pas
  111. <7 kyu> Robinson Crusoe - Solution: robinson_crusoe_unit.pas
  112. <7 kyu> Scaling Squared Strings - Solution: scaling_squared_strings_unit.pas
  113. <7 kyu> Sum of Numbers - Solution: sum_of_numbers_unit.pas
  114. <7 kyu> Target Date - Solution: target_date_unit.pas
  115. <7 kyu> Triangular Numbers - Solution: triangular_numbers_unit.pas
  116. <7 kyu> Vowel Count - Solution: vowel_count_unit.pas
  117. <7 kyu> Waiting room - Solution: waiting_room_unit.pas
  118. <8 kyu> Clock - Solution: clock_unit.pas
  119. <8 kyu> Cockroach - Solution: cockroach_unit.pas
  120. <8 kyu> Even or Odd - Solution: even_or_odd_unit.pas
  121. <8 kyu> Function 1 - hello world - Solution: hello_world_unit.pas
  122. <8 kyu> Grasshopper - Summation - Solution: grasshopper_summation_unit.pas
  123. <8 kyu> Multiply - Solution: multiply_unit.pas
  124. <8 kyu> School Paperwork - Solution: school_paperwork_unit.pas