Curated sets
Math and counting
Number theory, combinatorics, and geometry.
Total results6,670 problems
| Topics | Judge | |||||
|---|---|---|---|---|---|---|
| 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. | Easy1 | MathGeometry+1 | No attempts yet | 2s | 128 MB | Judgeable |
| HexadecimalConvert a hexadecimal number of at most 6 digits into its decimal value and print it. | Easy1 | MathImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| Cutting ChocolateCompute the minimum number of straight cuts needed to divide an N by M chocolate bar into all 1x1 pieces. | Easy1 | MathImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| Safari WorldRead two integers and print the absolute value of their difference. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Verification DigitCompute the check digit as the sum of squares of five given digits, mod 10. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Oven ClockGiven a start time and a number of minutes to cook, compute and print the finishing time on a 24-hour clock. | Easy1 | MathSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Sum of Two Numbers - 2Read two single-digit integers from separate lines and print their sum. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Average and MedianRead five natural numbers and print their average and median. | Easy1 | SortingArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| MultiplicationGiven two three-digit numbers, print the partial products from vertical multiplication and their total. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Least Common Multiple and Greatest Common DivisorFor multiple integer pairs, compute and print each pair's least common multiple and greatest common divisor. | Easy1 | MathNumber theory | No attempts yet | 1s | 128 MB | Judgeable |
| Fibonacci NumberCompute the nth Fibonacci number for n up to 45. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Leap YearGiven a year, output 1 if it is a leap year according to the standard divisibility rule, otherwise output 0. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| After the PartyCompute actual attendees as L times P, then output the difference between each of five reported counts and that value. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Alarm ClockGiven an alarm time in hours and minutes, compute and print the time 45 minutes earlier, wrapping around midnight if needed. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| SangsuReverse two given three-digit numbers digit by digit and print the larger reversed value. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Find R2Given R1 and the average S of two integers, compute and print the other integer R2. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Taxicab GeometryGiven radius R, compute and print the area of a Euclidean circle and a taxicab-metric circle. | Easy1 | MathGeometry+1 | No attempts yet | 1s | 128 MB | Judgeable |
| SharesFor repeated pairs N and S, print the largest integer x such that N times x does not exceed S. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Speed LimitGiven segments of constant speed with cumulative elapsed times, compute the total distance for each data set until n equals -1. | Easy1 | ImplementationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | ImplementationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SanggeunaldGiven prices for three burgers and two drinks, print the lowest cost of one burger plus one drink minus a 50 won combo discount. | Easy1 | ImplementationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| ReceiptGiven the total price of 10 books and the prices of 9 of them, find the missing book's price. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Exam ScoresGiven the four subject scores of two students, print the larger of the two totals, or Minguk's total when they tie. | Easy1 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Hot DogsRead pairs of integers H and P until end of file and print H/P rounded to exactly two decimal places. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Sanggeun's FriendsFor each test case, read the counts of male and female friends and print their sum; stop at the two zeros line. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | ImplementationBrute force+1 | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Easy1 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| AlienGiven a point and n axis-aligned rectangles, decide whether any rectangle contains the point, boundaries included. | Easy1 | GeometryImplementation+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Can You Add This?Read t pairs of integers and print the sum of each pair on its own line. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| PlaneGiven row and seat counts for business and economy classes, compute the total number of seats on the plane. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| SumGiven an integer n, compute and print the sum of all integers from 1 to n. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| FactorialRead n and print the ones digit of n factorial. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| LifeguardThe task is to count children farther than k meters from the lifeguard position. | Easy1 | GeometryMath | No attempts yet | 1s | 512 MB | Judgeable |
| Basketball PlayerGiven current height k, required height w and growth m per hit, compute the fewest hits needed to reach w. | Easy1 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| SticksGiven three stick lengths, print 2 if they form an equilateral triangle, 1 if only a right triangle, and 0 otherwise. | Easy1 | MathGeometry | No attempts yet | 1s | 128 MB | Judgeable |
| Mountain ShelterCompute the maximum number of dominoes that fit in a W by K grid for up to 10 test cases. | Easy1 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| StrollGiven a walk of N, S, E and W steps on a grid, compute the Manhattan distance from the endpoint back to the start. | Easy1 | SimulationMath | No attempts yet | 2s | 128 MB | Judgeable |
| 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. | Easy1 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| HeptathlonThe program converts seven event records into scores with the given formulas and prints the total for each test case. | Easy1 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Pennant RacePrint the team with the highest winning percentage, computed as wins divided by wins plus losses plus ties. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Plot of LandGiven N bead positions, compute the area of the smallest axis-aligned rectangle that contains them all. | Easy1 | GeometryImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Grocery ShoppingPick the crab stick bag with the highest grams per won, breaking ties by the lowest price. | Easy1 | Brute forceMath | No attempts yet | 1s | 128 MB | Judgeable |
| Ant EntrapmentTrack the minimum and maximum X and Y over the ants and report the area and perimeter of that bounding rectangle. | Easy1 | ImplementationMath | No attempts yet | 3s | 256 MB | Judgeable |
| Math TutoringRead each polynomial's degree and coefficients and print the coefficients of its derivative in the same format. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| How much?Add the base car price to each option's quantity times unit price for every test case. | Easy1 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy1 | MathImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| Sahur and Imsa'Given T timestamps, print the time 45 minutes earlier for each, wrapping past midnight. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Sum of Odd NumbersSum all odd integers from 1 to the given odd N for each test case. | Easy1 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Right TriangleGiven three side lengths per test case in any order, decide whether they form a right triangle. | Easy1 | MathSorting | No attempts yet | 1s | 128 MB | Judgeable |
| Max VolumeCompute the volume of each cone, cylinder, and sphere with pi as 3.14159 and print the largest value rounded to three decimals. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| NICE check letterRead seven digits, compute the weighted sum modulo 11, and print the mapped check letter. | Easy1 | ImplementationMath | No attempts yet | 2s | 1024 MB | Judgeable |
| 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. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| SnacksCompute K times N minus M, or zero when the money on hand covers the total snack price. | Easy1 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| Halloween CandySplit c candies evenly among v siblings so each gets the same count and the father keeps the remainder. | Easy1 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| Coupon DiscountApply a 20 percent coupon to each listed price and print the discounted price rounded to two decimals. | Easy1 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| Ship SelectionCount the ships whose fuel covers consumption times the integer-division travel time for the given distance. | Easy1 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Acid and BaseCompute the pH from each given H+ or OH- concentration with the log formulas and print it rounded to two decimals. | Easy1 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Golden Ratio TestGiven T pairs of numbers, print golden for each pair whose ratio a/b is within 1 percent of the golden ratio. | Easy1 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| ACM HotelGuests fill rooms column by column from the elevator with lower floors first, so print the room number of the Nth guest. | Easy1 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| 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. | Easy1 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| Do you like fractions?Convert each fraction to a mixed number by printing the quotient, the remainder, and the original denominator without reducing. | Easy1 | ImplementationMath | No attempts yet | 2s | 256 MB | Judgeable |
| Subin and the SequenceGiven the prefix averages of a sequence, recover the original sequence term by term. | Easy1 | Prefix sumMath | No attempts yet | 1s | 32 MB | Judgeable |
| Mosquito TrapFind the smallest area of an axis-aligned square that covers all given points on the table. | Easy1 | Geometry | No attempts yet | 1s | 32 MB | Judgeable |
| PolyhedronFor each test case, compute the face count of a convex polyhedron from V and E with Euler formula F = 2 - V + E. | Easy1 | Math | No attempts yet | 5s | 256 MB | Judgeable |
| Kings of PersiaGiven birth and death year ranges, compute the smallest and largest possible age for each king. | Easy1 | Math | No attempts yet | 2s | 256 MB | Judgeable |
| Water BillCompute the bills of companies X and Y from the given usage and output the cheaper one. | Easy1 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| ApplesEach school splits its apples evenly among its students, and the program sums the leftover apples. | Easy1 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| FactorialPrint the factorial of a given integer N, where N is between 0 and 12. | Easy1 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Ancient symbolGiven integer x, print 111 times x squared plus 11 times x plus 1. | Easy1 | Math | No attempts yet | 1s | 2 MB | Judgeable |
| N-orthotopeGiven two axis-aligned boxes in N dimensions, print the dimension of their overlap, or -1 when they do not meet. | Easy1 | ImplementationGeometry | No attempts yet | 1s | 256 MB | Judgeable |
| Comma-separated A+BAdd pairs of single-digit integers given as comma-separated values for each test case. | Easy1 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Compute my GPACompute each semester total credits and credit-weighted GPA from course credits and grades, rounded to one decimal place. | Easy1 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Namuk's Chicken CoopFrom the total number of legs and chickens, find how many chickens lost a leg and how many are intact. | Easy1 | Math | No attempts yet | 2s | 256 MB | Judgeable |
| The Eccentric ProfessorCompare n times s against d plus n times p for each test case and print which option costs less. | Easy1 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Balancing WeightsYou sum the signed positions of the weights and report whether the lever tips left, tips right, or stays balanced. | Easy1 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Cookie LoverGiven N cookies and C eaten per day, compute how many days pass until none remain. | Easy1 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Hangul SyllablesGiven N between 1 and 11172, print the N-th Hangul syllable in initial, medial, then final order. | Easy1 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Pedometer DistanceMultiply each step count by the stride length and print each distance in kilometres with five decimals. | Easy1 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| 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. | Easy1 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| 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. | Easy1 | Math | No attempts yet | 2s | 256 MB | Judgeable |
| Little JeongminAdd three given integers up to 10^12 and print their sum. | Easy1 | Math | No attempts yet | 1s | 512 MB | Judgeable |
| 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. | Easy1 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| Affine CipherApply E(X) = (aX + b) mod 26 to each uppercase letter of the plaintext and print the ciphertext. | Easy1 | ImplementationString+1 | No attempts yet | 5s | 256 MB | Judgeable |
| Box intersection volumeCompute the volume shared by N axis-aligned boxes by intersecting their x, y, and z ranges. | Easy1 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| Moving FruitCompute the fewest single-fruit moves between two baskets so one holds only apples and the other holds only oranges. | Easy1 | Math | No attempts yet | 1s | 32 MB | Judgeable |
| Fence PaintingCompute the total painted length covered by two given intervals on a number line. | Easy1 | IntervalsMath | No attempts yet | 2s | 512 MB | Judgeable |
| HicCupGiven N, add 10N, 10N+10, and 20N+20, then print the total. | Easy1 | MathImplementation | No attempts yet | 1s | 32 MB | Judgeable |
| George BooleRead one boolean operation in the form true AND false and print its result. | Easy1 | ImplementationString+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Will floats still pass?Print a fixed two-point set, (0, 0) and (1, 1), with no input; the answer is a constant output. | Easy1 | ImplementationGeometry | No attempts yet | 2s | 512 MB | Judgeable |