Details
ex00
- New franchise (assets A, yearly growth X) aims to be richest. Existing richest entities maintain current wealth (no growth). Target wealth to be richest is B billion. Find years (Y) needed for the franchise to reach or exceed target wealth.
ex01
- Second dose timing: You're given the days elapsed since the first dose (D), the minimum wait requirement (L) and the maximum allowed wait (R) for the second dose. The problem asks you to determine if it's too early (D less than L), on time (D within the range L to R, inclusive), or too late (D greater than R) for the second dose.
ex02
- Determine the last hoop that will be successfully jumped into before someone reaches an occupied hoop.This problem describes a game involving you and a friend jumping through hoops in a row. There are some key points: Number of Hoops (N): An odd number of hoops are arranged in a line. Jumping Pattern: You and your friend take turns jumping, alternating between the first and last hoop, then the second and second-to-last, and so on.
ex03
ex04
ex05
- Develop language needs features A and B. Two options: language 1 (features A1, B1) and language 2 (features A2, B2). All features are unique (A, B, A1, B2 distinct). Identify which language (1, 2, or neither) offers both required features.
ex06
- There are three spells with powers A, B, and C. Initially, a character has 0 hit points. Each spell increases hit points by its corresponding power value. The goal is to find the maximum number of hit points achievable by selecting and using exactly two of the three spells.
ex07
- Given two integers N and K, you can repeatedly subtract K from N. The goal is to find the smallest non-negative value you can reach after any number of subtractions (including zero subtractions). In other words, you need to determine the minimum non-negative remainder after repeatedly dividing N by K.
ex08
- An individual's weight before lockdown (w1) is known. After M months of lockdown, their weight (w2) is measured on an inaccurate scale (potentially unreliable). Research shows growing individuals gain weight within a range (x1 to x2) per month. Determine if the weight gain shown on the scale (w2 - w1) could be a realistic weight increase for M months based on the expected range for growing individuals.
ex09
- Stock buy decision: Given initial price (S), desired buy range ([A, B]), and price change (C%), determine if final price allows purchase based on the desired range. Print "YES" or "NO".
ex10
- Given an initial stock price (S), desired purchase range ([A, B]), and a percentage change (C), determine if the stock price allows for purchase. The final price is calculated as S * (1 + C/100). Print "YES" if the final price falls within the desired range, "NO" otherwise.
ex11
- Given a vehicle's current speed (U), distance to a turn (S), safe speed limit for the turn (V), and maximum deceleration (A), determine if the vehicle can reach the turn at a safe speed (V or less) using available braking distance (S). Physics formula (v^2 = U^2 + 2as) is used to calculate the final speed (v) upon entering the turn. Output "Yes" if safe braking is possible, "No" otherwise.
ex12
- This problem deals with finding the longest subsequence with an even sum in an ordered sequence. The sequence consists of all integers from 1 to a given value N (inclusive), appearing exactly once in increasing order. We're interested in identifying the longest contiguous subsequence within this sequence where the sum of all the elements in the subsequence is an even number.
ex13
- This problem deals with finding reachable sums within a range. Given a range of integers (L to R), it asks how many distinct integers within that range can be formed by adding two (not necessarily different) integers from the same range.
ex14
- This problem deals with reachability on a fixed-size grid. Given a starting location and an ending location, it asks if it's possible to move from the start to the end in a specific number of steps, considering the following constraints:
Movement is only allowed between neighboring cells that share a side. The total number of allowed steps is fixed. The solution involves checking if the ending location is reachable within the given step limit based on the allowed movement pattern.