Problems

Pick a problem and write your solution in the built-in editor. The judge runs it against real test cases while you watch, and the wider archive is open to read whenever you like.

Total results5,551 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
The Y Bus Goes VroomSimulate the passenger count as a bus travels N stops with given boarding and alighting numbers, then print the driver's fixed name.Easy1SimulationImplementation+1No attempts yet2s256 MBJudgeable
Pick the QuadrantRead the x and y coordinates of a nonzero point and print which of the four quadrants it lies in.Easy1ImplementationMathNo attempts yet1s512 MBJudgeable
Shifty SumGiven N and k, print N + 10N + ... + 10^k N.Easy1MathImplementationNo attempts yet1s512 MBJudgeable
Polynomial Derivative (Small)Given the nonzero terms of a polynomial, compute the value of its derivative at x = 1.Easy1MathImplementation+1No attempts yet1s128 MBJudgeable
FizzBuzzPrint the numbers 1 through N, writing Fizz for multiples of X, Buzz for multiples of Y, and FizzBuzz for multiples of both.Easy1ImplementationMath+2No attempts yet1s512 MBJudgeable
AdditionRead two integers between -100,000 and 100,000 and print their sum.Easy1MathImplementationNo attempts yet1s512 MBJudgeable
Judging MooseGiven the tine counts on each side, print the moose's score as Even x, Odd x, or Not a moose when both sides are zero.Easy1ImplementationMathNo attempts yet1s512 MBJudgeable
Hard choiceGiven prepared and requested counts for chicken, beef, and pasta, count passengers whose requested meal is unavailable.Easy1MathImplementationNo attempts yet1s1024 MBJudgeable
Every Second CountsGiven a start and end clock time, compute how many seconds elapsed, adding 24 hours if the ride crosses midnight.Easy1MathImplementationNo attempts yet2s512 MBJudgeable
AnglesFor each triple of angles, print the numbers and say whether they sum to 180.Easy1ImplementationMathNo attempts yet2s512 MBJudgeable
Chanukah CandlesEach evening needs one more candle than the last plus one shammas, so for N days compute N(N+1)/2 + N.Easy1MathImplementationNo attempts yet2s512 MBJudgeable
Sim CardFor each student, compute the smallest total cost of call minutes and data across the three fixed operator price plans.Easy1ImplementationBrute force+1No attempts yet2s512 MBJudgeable
Vera's FashionGiven N tops and N bottoms colored 1 to N, count how many top and bottom pairs have different colors.Easy1MathCombinatorics+1No attempts yet2s256 MBJudgeable
Fast A+BRead T pairs of integers from fast input and print each sum on its own line.Easy1ImplementationMath+1No attempts yet1s512 MBJudgeable
Sum of N integersRead N integers and print their sum, which needs a 64-bit integer type.Easy1ImplementationMathNo attempts yet0.1s512 MBJudgeable
Linear Algebra and GroupOutput the sum of the digits appearing in the cover illustration of a specific linear algebra textbook.Easy1ImplementationMath+2No attempts yet1s256 MBJudgeable
RectangleImplement a Rectangle class with width and height, range-checked setters, and methods for area, perimeter, and square detection.Easy1ImplementationMath+2No attempts yet1s512 MBJudgeable
The group project starts and the team leader is goneGiven a distance L, Sungwoo covers 1 to 5 per minute; print the smallest integer number of minutes needed to reach Mingeon.Easy1MathImplementation+1No attempts yet1s128 MBJudgeable
Helmet and VestGiven a list of helmet defense values and a list of vest values, print the sum of the best helmet and the best vest.Easy1ArrayImplementation+2No attempts yet1s512 MBJudgeable
Simple ArithmeticRead three integers a, b, c and print a times b divided by c within an absolute error of 1e-6.Easy1MathImplementationNo attempts yet1s1024 MBJudgeable
CASIORead two integers N and M and print 1 if they are equal, otherwise 0.Easy1ImplementationMathNo attempts yet2s256 MBJudgeable
Weird SymbolGiven two integers A and B, compute (A+B)*(A-B) and print the result.Easy1MathImplementationNo attempts yet2s256 MBJudgeable
Hongik UniversityRead a year N and print how many years have passed since 1946, so output N minus 1946.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Jerry and TomSubtract the fraction A/B from 1 and print the remaining cheese as P/Q in lowest terms.Easy1MathNumber theory+1No attempts yet1s128 MBJudgeable
Missing RunnerGiven the numbers 1 to N with exactly one omitted from a list of N - 1 distinct values, report the missing number.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Overflowing with SweetnessGiven triples a and c, find triple b with components in 1 to 100 such that performing the defined cake operation a cake b yields c.Easy1MathImplementation+2No attempts yet1s256 MBJudgeable
Telephone Directory Information RoutingGiven a 7-digit phone number, print YES if its first three digits are 555, otherwise NO.Easy1ImplementationMathNo attempts yet1s512 MBJudgeable
Born in 1998, but 2541 in Thailand?!Given a Buddhist calendar year between 1000 and 3000, print the corresponding Gregorian year by subtracting 543.Easy1MathImplementation+2No attempts yet1s1024 MBJudgeable
RatsGiven three counts from a mark-recapture study, compute the Chapman estimator using the stated floor formula and print it.Easy1MathImplementation+1No attempts yet1s512 MBJudgeable
PetrolGiven the petrol n used next month and the leftover quota k, compute the cost where the first 60+k liters cost 1500 each and the rest cost 3000 each.Easy1MathImplementationNo attempts yet2s512 MBJudgeable
HOMWRKRead pairs of integers and print each pair's sum followed by its product on one line.Easy1MathImplementationNo attempts yet2s512 MBJudgeable
A+B (MC)Build a Minecraft redstone circuit that reads two integers from a command interpreter and outputs their sum.Easy1SimulationImplementation+1No attempts yet1s512 MBJudgeable
Dog TreatsRead the counts of small, medium, and large treats, compute 1*S + 2*M + 3*L, and print happy if the score is at least 10, otherwise sad.Easy1MathImplementationNo attempts yet2s512 MBJudgeable
Random Game~~~~~Output any integer between 1 and 2,147,483,647; the judge scores each of three runs by how close your number lands to a hidden random pick.Easy1MathProbability+2No attempts yet1s256 MBJudgeable
Barn LotteryGiven N cows and a W by H barn, find how many L by L square spaces fit inside the barn, capped at N.Easy1MathImplementation+2No attempts yet1s1024 MBJudgeable
Hansu NumbersCount integers from 1 to N (N up to 1000) whose digits form an arithmetic sequence.Easy2ImplementationBrute force+1No attempts yet2s128 MBJudgeable
Make It DivisibleFind the smallest two-digit replacement (00-99) for the last two digits of N that makes N divisible by F.Easy2Brute forceMath+1No attempts yet2s128 MBJudgeable
Octal to BinaryConvert a huge octal number (up to 333,334 digits) into its binary representation without leading zeros.Easy2StringImplementation+1No attempts yet1s256 MBJudgeable
Sign of Integer SumsFor three separate lists of integers, compute each sum and print whether it is positive, negative, or zero, handling values up to 64-bit signed range.Easy2ImplementationMathNo attempts yet2s256 MBJudgeable
Mobile Phone BillGiven up to 20 call durations, compute total cost under two per-block billing plans and print the cheaper one with its cost.Easy2SimulationImplementation+1No attempts yet2s128 MBJudgeable
House Number SignCompute the total width of a house-number sign given fixed per-digit widths and 1 cm margins between digits and at both ends, for each input number until 0 appears.Easy2ImplementationString+1No attempts yet1s128 MBJudgeable
Easy Sequence SumGiven a sequence where each integer k repeats k times, compute the sum of terms between positions A and B.Easy2MathSimulation+1No attempts yet2s128 MBJudgeable
TV SizeGiven a TV's diagonal length and height-to-width ratio, compute the actual height and width, flooring non-integer results.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Year Progress BarGiven a date and time string, compute what percentage of the current year (accounting for leap years) has elapsed.Easy2ImplementationMathNo attempts yet2s128 MBJudgeable
Actual Disk SpaceGiven N file sizes and a cluster size, compute total disk space used by rounding each file up to the nearest cluster multiple and summing.Easy2MathImplementation+1No attempts yet2s128 MBJudgeable
Reversed AdditionReverse the digits of two numbers up to 1000, add the reversed values, then reverse the sum and print the result.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
24-Hour MissionGiven the current time and a start time in HH:MM:SS, compute the time remaining until the start time next occurs within a 24-hour cycle.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Room NumberGiven a room number, count how many plastic digit sets (0-9 each) are needed, treating 6 and 9 as interchangeable when flipped.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Adjusted AverageGiven N exam scores, rescale each by dividing by the maximum score and multiplying by 100, then output the average of the rescaled scores.Easy2ArrayMath+1No attempts yet2s128 MBJudgeable
Manhattan Distance on a Four-Row Number BoardGiven two numbers placed column by column in a 4-row grid, compute the Manhattan distance between their cell positions.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Chicken CouponsGiven n chicken coupons and a stamp-to-coupon exchange rate k, compute the maximum chickens obtainable by repeatedly redeeming stamps for new coupons.Easy2MathSimulation+1No attempts yet2s128 MBJudgeable
Growth PointsSimulate a tree that multiplies its leaves by a yearly factor then subtracts pruned branches, and report the final leaf count.Easy2SimulationMathNo attempts yet1s128 MBJudgeable
Break-Even PointGiven fixed cost A, variable cost B, and price C, find the smallest number of laptops where revenue exceeds total cost, or -1 if impossible.Easy2MathImplementationNo attempts yet0.35s128 MBJudgeable
Next Term in a SequenceGiven a sequence that is either arithmetic or geometric, determine which type it is and output its next term.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Fraction SumAdd two given fractions and output the sum reduced to lowest terms using GCD.Easy2MathNumber theory+1No attempts yet2s128 MBJudgeable
Concatenating Numbers 1Compute the total digit count when integers from 1 to N are written consecutively without spaces.Easy2MathImplementationNo attempts yet0.15s128 MBJudgeable
Numbers With Equal Remainder and QuotientGiven N, find the sum of all positive integers x whose quotient and remainder are equal when divided by N.Easy2MathNo attempts yet2s256 MBJudgeable
Octopus NumbersConvert base-8 strings using nine special symbols (including one for digit -1) into their decimal integer values until a terminator line appears.Easy2StringMath+1No attempts yet1s128 MBJudgeable
Good License PlatesFor each license plate, compute a base-26 value from the three letters and compare it to the four-digit number, printing whether their difference is within 100.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
Fourth PointGiven two adjacent sides of a parallelogram as endpoint coordinates, compute and print the fourth vertex for each line of input.Easy2GeometryMath+1No attempts yet2s128 MBJudgeable
Year 2007Given a month and day in 2007, compute and print the corresponding day of the week starting from Monday, Jan 1.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Least Common MultipleFor each of up to 1000 pairs of numbers, compute and print the least common multiple.Easy2MathNumber theoryNo attempts yet1s128 MBJudgeable
Counting Pentagon PointsCompute the total pentagonal points after N steps using a simple arithmetic formula, modulo 45678.Easy2MathImplementationNo attempts yet2s256 MBJudgeable
Perfect SquaresGiven two numbers M and N up to 10000, sum all perfect squares in that inclusive range and print the smallest one, or -1 if none exist.Easy2MathBrute force+1No attempts yet2s128 MBJudgeable
Counting PrimesCount how many of up to 100 given numbers (each at most 1000) are prime.Easy2MathBrute forceNo attempts yet2s128 MBJudgeable
PlugsGiven N power strips each with a plug capacity, compute the max number of computers powered when strips are chained from one wall outlet.Easy2MathGreedy+1No attempts yet2s256 MBJudgeable
Self-Replicating NumberCheck whether squaring an integer N reproduces N as the trailing digits of N squared.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Day of the YearGiven day, month, year, compute the day's ordinal number within that year accounting for leap years, until a 0 0 0 terminator.Easy2ImplementationMathNo attempts yet1s128 MBJudgeable
Number GameRepeatedly sum decimal digits of each number until one digit remains, processing lines until a terminating zero.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Prime WordSum letter values (a-z=1-26, A-Z=27-52) for a word and print whether the sum is prime (with 1 counted as prime).Easy2StringMath+1No attempts yet2s128 MBJudgeable
Restoring NumbersFor each given integer up to 100,000, output its prime factorization as prime-exponent pairs in increasing order.Easy2MathNumber theory+1No attempts yet2s128 MBJudgeable
Sum of Consecutive IntegersGiven two integers, print the sum of all integers in the closed range between them, handling either order.Easy2MathImplementationNo attempts yet0.25s128 MBJudgeable
Find the K-th DivisorGiven N and K, find and print the K-th smallest divisor of N, or 0 if it doesn't exist.Easy2MathBrute forceNo attempts yet1s128 MBJudgeable
AI Oven ClockGiven a start time in hours, minutes, seconds and a duration in seconds, compute the finishing time on a 24-hour clock that wraps around.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Candy Teacher Go ChangyoungCheck whether the total number of candies among N students can be evenly divided among them (sum divisible by N).Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Digit Counts in a ProductGiven three 3-digit natural numbers, compute their product and count how many times each digit 0 to 9 appears in it.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Greatest Common Divisor and Least Common MultipleGiven two natural numbers up to 10000, output their greatest common divisor and least common multiple.Easy2MathNumber theoryNo attempts yet1s128 MBJudgeable
U.S. Unit ConversionConvert given values between kilograms/pounds and liters/gallons using fixed conversion factors, rounding to four decimal places.Easy2ImplementationMathNo attempts yet1s128 MBJudgeable
Laundry Owner DonghyukGiven a number of cents, output the minimum count of quarters, dimes, nickels, and pennies using a greedy coin breakdown.Easy2GreedyMath+1No attempts yet1s128 MBJudgeable
Weighted Triangular SumCompute a weighted sum of triangular numbers W(n) for up to 300 test cases using a direct formula or loop.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Binary AdditionAdd two binary strings up to length 80 for multiple test cases and print the sum without leading zeros.Easy2StringSimulation+1No attempts yet1s128 MBJudgeable
Base ConversionConvert a number given in an arbitrary base (2 to 36, using letters for digits above 9) into its decimal value.Easy2MathImplementation+1No attempts yet1s128 MBJudgeable
Fibonacci Number 2Compute the nth Fibonacci number for n up to 90.Easy2Dynamic programmingMathNo attempts yet1s128 MBJudgeable
What Is This Semester's GPA?Compute a weighted GPA from a list of courses, credits, and letter grades, rounded to two decimal places.Easy2ImplementationMathNo attempts yet1s128 MBJudgeable
Triangular Gimbap Price ComparisonGiven several price rates for gimbap, compute the cheapest cost to buy exactly 1000 grams using the best per-gram rate among all stores.Easy2MathGreedy+1No attempts yet1s128 MBJudgeable
Sugar DeliveryFind the minimum number of 3kg and 5kg bags that sum to exactly N kilograms, or -1 if impossible.Easy2GreedyMathNo attempts yet1s128 MBJudgeable
Climbing SnailCompute the number of days for a snail climbing A meters by day and sliding B meters by night to reach a pole of height V.Easy2MathSimulationNo attempts yet0.25s128 MBJudgeable
CopyrightGiven A songs and a rounded-up average I, find the smallest total copyrighted melodies consistent with ceil(total/A) = I.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
DominoesGiven N, compute the total dot count across all unique dominoes with halves ranging from 0 to N.Easy2MathCombinatoricsNo attempts yet1s128 MBJudgeable
Year 2009Given a day and month in the year 2009, output the English name of the weekday for that date.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Chessboard PiecesGiven N straight guillotine cuts through a rectangular board, compute the maximum number of resulting pieces.Easy2MathGreedyNo attempts yet1s128 MBJudgeable
Fourth PointGiven three corners of an axis-aligned rectangle, compute the coordinates of the missing fourth corner.Easy2GeometryMath+1No attempts yet1s128 MBJudgeable
Time Until the WarningGiven current time and a future warning time in a day, compute the wait time as a difference modulo 24 hours, printing 24:00:00 if they match.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Angry ChangyoungFor each match length, decide if it fits diagonally inside a W by H rectangle and print DA or NE accordingly.Easy2GeometryMath+1No attempts yet1s128 MBJudgeable
15-Puzzle DisplacementCompute the total Manhattan distance of each labeled tile from its position in the solved 4x4 15-puzzle board.Easy2ArrayMath+1No attempts yet1s128 MBJudgeable
Number ReversalFor each number, reverse its digits, add to the original, and print YES if the sum is a palindrome, else NO.Easy2StringMath+1No attempts yet1s128 MBJudgeable
Hyunwoo the ProfessorFor each given N, output the number of trailing zeros in N! by counting factors of 5.Easy2MathNo attempts yet1s128 MBJudgeable
Automated Telephone ExchangeGiven a 3-digit exchange index n, count pairs of two-digit numbers a,b (00-99) such that n - a - b = 0.Easy2Brute forceMathNo attempts yet1s128 MBJudgeable
FlatGiven room areas and types, compute total area, total bedroom area, and flat cost using half-weighted balcony area.Easy2ImplementationMathNo attempts yet3s256 MBJudgeable
K-Graph OddityCompute the maximum vertex degree in a graph and output the smallest odd integer greater than or equal to it.Easy2GraphImplementation+1No attempts yet1s128 MBJudgeable