Curated sets

Math and counting

Number theory, combinatorics, and geometry.

All problems
Total results6,670 problems
TopicsJudge
Escape from a RectangleGiven a point inside an axis-aligned rectangle, compute the minimum distance from the point to the nearest side of the rectangle.Easy1MathGeometry+1No attempts yet2s128 MBJudgeable
HexadecimalConvert a hexadecimal number of at most 6 digits into its decimal value and print it.Easy1MathImplementationNo attempts yet2s128 MBJudgeable
Cutting ChocolateCompute the minimum number of straight cuts needed to divide an N by M chocolate bar into all 1x1 pieces.Easy1MathImplementationNo attempts yet2s128 MBJudgeable
Safari WorldRead two integers and print the absolute value of their difference.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Verification DigitCompute the check digit as the sum of squares of five given digits, mod 10.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Oven ClockGiven a start time and a number of minutes to cook, compute and print the finishing time on a 24-hour clock.Easy1MathSimulationNo attempts yet1s128 MBJudgeable
Sum of Two Numbers - 2Read two single-digit integers from separate lines and print their sum.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Average and MedianRead five natural numbers and print their average and median.Easy1SortingArray+1No attempts yet1s128 MBJudgeable
MultiplicationGiven two three-digit numbers, print the partial products from vertical multiplication and their total.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Least Common Multiple and Greatest Common DivisorFor multiple integer pairs, compute and print each pair's least common multiple and greatest common divisor.Easy1MathNumber theoryNo attempts yet1s128 MBJudgeable
Fibonacci NumberCompute the nth Fibonacci number for n up to 45.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Leap YearGiven a year, output 1 if it is a leap year according to the standard divisibility rule, otherwise output 0.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
After the PartyCompute actual attendees as L times P, then output the difference between each of five reported counts and that value.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Alarm ClockGiven an alarm time in hours and minutes, compute and print the time 45 minutes earlier, wrapping around midnight if needed.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
SangsuReverse two given three-digit numbers digit by digit and print the larger reversed value.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Find R2Given R1 and the average S of two integers, compute and print the other integer R2.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Taxicab GeometryGiven radius R, compute and print the area of a Euclidean circle and a taxicab-metric circle.Easy1MathGeometry+1No attempts yet1s128 MBJudgeable
SharesFor repeated pairs N and S, print the largest integer x such that N times x does not exceed S.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
The Navi-Computer is Down!Read pairs of 3D coordinates and system names, and print the Euclidean distance between each pair rounded to two decimals.Easy1MathImplementation+1No attempts yet1s128 MBJudgeable
Speed LimitGiven segments of constant speed with cumulative elapsed times, compute the total distance for each data set until n equals -1.Easy1ImplementationMath+1No attempts yet1s128 MBJudgeable
LunacyFor each non-negative Earth weight read until a negative sentinel, print a sentence giving the weight on the Moon at 0.167 times the Earth weight, both rounded to two decimals.Easy1ImplementationMathNo attempts yet1s128 MBJudgeable
Spinner Lock SimulationGiven the starting digits of a spinner lock and a sequence of button labels, add each label's digits to the wheels modulo 10 and print the final readout.Easy1SimulationImplementation+2No attempts yet1s128 MBJudgeable
TGN Advertising DecisionFor each test case, compare the no-ad revenue r against e minus c, then print advertise, do not advertise, or does not matter.Easy1ImplementationMathNo attempts yet1s128 MBJudgeable
Triangle and Its Three SidesRead triples of positive integers until 0 0 0, and for each print Equilateral, Isosceles, Scalene, or Invalid based on equal sides and the triangle inequality.Easy1ImplementationMath+1No attempts yet1s128 MBJudgeable
Divisors and MultiplesFor each pair of numbers, print factor if the first divides the second, multiple if the first is a multiple of the second, or neither.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Sarah's ToysFor each night, subtract the toys left around the house from the total, then report how many pairs and whether one group of 3 is formed.Easy1MathImplementation+1No attempts yet1s128 MBJudgeable
PyramidsFor each positive base size n until a terminating 0, print the total number of blocks in a pyramid whose layers count down from n to 1.Easy1MathImplementation+2No attempts yet1s128 MBJudgeable
Battle Droid PriceFor each test case, multiply five part quantities by fixed prices, sum them, and print the total with a dollar sign and two decimals.Easy1MathImplementation+2No attempts yet1s128 MBJudgeable
SanggeunaldGiven prices for three burgers and two drinks, print the lowest cost of one burger plus one drink minus a 50 won combo discount.Easy1ImplementationMath+2No attempts yet1s128 MBJudgeable
The Errand RouteAdd four travel times given in seconds and print the total split into minutes on the first line and seconds on the second.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
ReceiptGiven the total price of 10 books and the prices of 9 of them, find the missing book's price.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Exam ScoresGiven the four subject scores of two students, print the larger of the two totals, or Minguk's total when they tie.Easy1ImplementationMathNo attempts yet1s128 MBJudgeable
Hot DogsRead pairs of integers H and P until end of file and print H/P rounded to exactly two decimal places.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Sanggeun's FriendsFor each test case, read the counts of male and female friends and print their sum; stop at the two zeros line.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Which Alien?Given the number of antennae and eyes a witness saw, print the names of all alien species whose ranges match, in the order given.Easy1ImplementationBrute force+1No attempts yet2s512 MBJudgeable
Roll the DiceCount ordered pairs (a, b) with a from 1 to m, b from 1 to n, and a + b = 10, then print the count with singular or plural wording.Easy1MathImplementation+1No attempts yet1s128 MBJudgeable
AlienGiven a point and n axis-aligned rectangles, decide whether any rectangle contains the point, boundaries included.Easy1GeometryImplementation+2No attempts yet2s128 MBJudgeable
Can You Add This?Read t pairs of integers and print the sum of each pair on its own line.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
PlaneGiven row and seat counts for business and economy classes, compute the total number of seats on the plane.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
SumGiven an integer n, compute and print the sum of all integers from 1 to n.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
FactorialRead n and print the ones digit of n factorial.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
LifeguardThe task is to count children farther than k meters from the lifeguard position.Easy1GeometryMathNo attempts yet1s512 MBJudgeable
Basketball PlayerGiven current height k, required height w and growth m per hit, compute the fewest hits needed to reach w.Easy1MathNo attempts yet1s128 MBJudgeable
Sign of OperationChoose the operator among +, -, and * that gives the largest value for a and b, and print the expression or NIE on a tie.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
SticksGiven three stick lengths, print 2 if they form an equilateral triangle, 1 if only a right triangle, and 0 otherwise.Easy1MathGeometryNo attempts yet1s128 MBJudgeable
Mountain ShelterCompute the maximum number of dominoes that fit in a W by K grid for up to 10 test cases.Easy1MathNo attempts yet1s128 MBJudgeable
StrollGiven a walk of N, S, E and W steps on a grid, compute the Manhattan distance from the endpoint back to the start.Easy1SimulationMathNo attempts yet2s128 MBJudgeable
Trial Task 2Given n scored rounds plus one trial round with 2 to 3 problems each, print the smallest and largest possible total problem counts.Easy1MathNo attempts yet1s128 MBJudgeable
HeptathlonThe program converts seven event records into scores with the given formulas and prints the total for each test case.Easy1ImplementationMathNo attempts yet1s128 MBJudgeable
Pennant RacePrint the team with the highest winning percentage, computed as wins divided by wins plus losses plus ties.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Plot of LandGiven N bead positions, compute the area of the smallest axis-aligned rectangle that contains them all.Easy1GeometryImplementationNo attempts yet1s128 MBJudgeable
Grocery ShoppingPick the crab stick bag with the highest grams per won, breaking ties by the lowest price.Easy1Brute forceMathNo attempts yet1s128 MBJudgeable
Ant EntrapmentTrack the minimum and maximum X and Y over the ants and report the area and perimeter of that bounding rectangle.Easy1ImplementationMathNo attempts yet3s256 MBJudgeable
Math TutoringRead each polynomial's degree and coefficients and print the coefficients of its derivative in the same format.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
How much?Add the base car price to each option's quantity times unit price for every test case.Easy1ImplementationMathNo attempts yet1s128 MBJudgeable
Find the missing pagesGiven a booklet of N pages and a page P, print the other three pages on the same folded sheet in ascending order.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Kkung's Space TripCount the ships that reach the destination by checking whether each ship's fuel covers its burn rate over the travel time.Easy1MathImplementationNo attempts yet2s128 MBJudgeable
Sahur and Imsa'Given T timestamps, print the time 45 minutes earlier for each, wrapping past midnight.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Sum of Odd NumbersSum all odd integers from 1 to the given odd N for each test case.Easy1MathNo attempts yet1s128 MBJudgeable
Right TriangleGiven three side lengths per test case in any order, decide whether they form a right triangle.Easy1MathSortingNo attempts yet1s128 MBJudgeable
Max VolumeCompute the volume of each cone, cylinder, and sphere with pi as 3.14159 and print the largest value rounded to three decimals.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
NICE check letterRead seven digits, compute the weighted sum modulo 11, and print the mapped check letter.Easy1ImplementationMathNo attempts yet2s1024 MBJudgeable
Filling in the missing rectangle valueEach line gives a rectangle's length, width and area with one value replaced by 0, and you compute and print the missing value.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
SnacksCompute K times N minus M, or zero when the money on hand covers the total snack price.Easy1MathNo attempts yet1s256 MBJudgeable
Halloween CandySplit c candies evenly among v siblings so each gets the same count and the father keeps the remainder.Easy1MathNo attempts yet1s256 MBJudgeable
Coupon DiscountApply a 20 percent coupon to each listed price and print the discounted price rounded to two decimals.Easy1MathNo attempts yet1s256 MBJudgeable
Ship SelectionCount the ships whose fuel covers consumption times the integer-division travel time for the given distance.Easy1ImplementationMathNo attempts yet1s256 MBJudgeable
Acid and BaseCompute the pH from each given H+ or OH- concentration with the log formulas and print it rounded to two decimals.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Golden Ratio TestGiven T pairs of numbers, print golden for each pair whose ratio a/b is within 1 percent of the golden ratio.Easy1ImplementationMathNo attempts yet1s256 MBJudgeable
ACM HotelGuests fill rooms column by column from the elevator with lower floors first, so print the room number of the Nth guest.Easy1MathNo attempts yet1s256 MBJudgeable
Mod ArithmeticGiven A, B and C, print (A+B)%C, ((A%C)+(B%C))%C, (AxB)%C and ((A%C)x(B%C))%C on four lines.Easy1MathNo attempts yet1s256 MBJudgeable
Do you like fractions?Convert each fraction to a mixed number by printing the quotient, the remainder, and the original denominator without reducing.Easy1ImplementationMathNo attempts yet2s256 MBJudgeable
Subin and the SequenceGiven the prefix averages of a sequence, recover the original sequence term by term.Easy1Prefix sumMathNo attempts yet1s32 MBJudgeable
Mosquito TrapFind the smallest area of an axis-aligned square that covers all given points on the table.Easy1GeometryNo attempts yet1s32 MBJudgeable
PolyhedronFor each test case, compute the face count of a convex polyhedron from V and E with Euler formula F = 2 - V + E.Easy1MathNo attempts yet5s256 MBJudgeable
Kings of PersiaGiven birth and death year ranges, compute the smallest and largest possible age for each king.Easy1MathNo attempts yet2s256 MBJudgeable
Water BillCompute the bills of companies X and Y from the given usage and output the cheaper one.Easy1ImplementationMathNo attempts yet1s256 MBJudgeable
ApplesEach school splits its apples evenly among its students, and the program sums the leftover apples.Easy1MathNo attempts yet1s256 MBJudgeable
FactorialPrint the factorial of a given integer N, where N is between 0 and 12.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Ancient symbolGiven integer x, print 111 times x squared plus 11 times x plus 1.Easy1MathNo attempts yet1s2 MBJudgeable
N-orthotopeGiven two axis-aligned boxes in N dimensions, print the dimension of their overlap, or -1 when they do not meet.Easy1ImplementationGeometryNo attempts yet1s256 MBJudgeable
Comma-separated A+BAdd pairs of single-digit integers given as comma-separated values for each test case.Easy1ImplementationMathNo attempts yet1s256 MBJudgeable
Compute my GPACompute each semester total credits and credit-weighted GPA from course credits and grades, rounded to one decimal place.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Namuk's Chicken CoopFrom the total number of legs and chickens, find how many chickens lost a leg and how many are intact.Easy1MathNo attempts yet2s256 MBJudgeable
The Eccentric ProfessorCompare n times s against d plus n times p for each test case and print which option costs less.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Balancing WeightsYou sum the signed positions of the weights and report whether the lever tips left, tips right, or stays balanced.Easy1ImplementationMathNo attempts yet1s256 MBJudgeable
Cookie LoverGiven N cookies and C eaten per day, compute how many days pass until none remain.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Hangul SyllablesGiven N between 1 and 11172, print the N-th Hangul syllable in initial, medial, then final order.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Pedometer DistanceMultiply each step count by the stride length and print each distance in kilometres with five decimals.Easy1ImplementationMathNo attempts yet1s256 MBJudgeable
Covering an equilateral triangleCover an equilateral triangle of side A with the smallest possible number of side-B equilateral triangles, which is (A/B) squared.Easy1MathNo attempts yet1s256 MBJudgeable
Polynomial BoundariesGiven polynomial coefficients and a point (x, y), evaluate the polynomial at x and report whether y lies below, on, or above its value.Easy1MathNo attempts yet2s256 MBJudgeable
Little JeongminAdd three given integers up to 10^12 and print their sum.Easy1MathNo attempts yet1s512 MBJudgeable
Three Kinds of SumsFor each data set with N, print the sums of the first N positive integers, the first N odd integers, and the first N even integers.Easy1MathNo attempts yet1s256 MBJudgeable
Affine CipherApply E(X) = (aX + b) mod 26 to each uppercase letter of the plaintext and print the ciphertext.Easy1ImplementationString+1No attempts yet5s256 MBJudgeable
Box intersection volumeCompute the volume shared by N axis-aligned boxes by intersecting their x, y, and z ranges.Easy1MathNo attempts yet1s256 MBJudgeable
Moving FruitCompute the fewest single-fruit moves between two baskets so one holds only apples and the other holds only oranges.Easy1MathNo attempts yet1s32 MBJudgeable
Fence PaintingCompute the total painted length covered by two given intervals on a number line.Easy1IntervalsMathNo attempts yet2s512 MBJudgeable
HicCupGiven N, add 10N, 10N+10, and 20N+20, then print the total.Easy1MathImplementationNo attempts yet1s32 MBJudgeable
George BooleRead one boolean operation in the form true AND false and print its result.Easy1ImplementationString+2No attempts yet2s512 MBJudgeable
Will floats still pass?Print a fixed two-point set, (0, 0) and (1, 1), with no input; the answer is a constant output.Easy1ImplementationGeometryNo attempts yet2s512 MBJudgeable