/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* part1.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: tomoron +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/07/17 23:03:36 by tomoron #+# #+# */ /* Updated: 2025/12/01 10:45:18 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ #include #include #include "libft/libft.h" long int resolve_part1(char *input, char **split) { (void)input; int move_val; long int cur_val; long int res; cur_val = 50; res = 0; while(*split) { move_val = ft_atoi((*split) + 1); if(**split == 'L') move_val *= -1; cur_val += move_val; if(cur_val % 100 == 0) res++; split++; } return(res); }