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 results6,382 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
GolfFor each test case, turn a hole's par and John's stroke count into the standard golf score name, with hole-in-one taking priority.Easy2ImplementationMath+2No attempts yet1s128 MBJudgeable
Ballot EvaluationSum the given parties' vote percentages and check the sum against an integer n using the guess's comparison operator.Easy2Hash mapImplementation+1No attempts yet1s128 MBJudgeable
Deli DeliFor each of N words, apply the first matching pluralization rule from a list of irregular forms and four suffix rules, then print the result.Easy2StringHash map+2No attempts yet1s128 MBJudgeable
Hard to Believe, but True!Read the numbers in each equation backwards, add them, and check whether the sum equals the backwards-read result.Easy2StringMath+1No attempts yet1s128 MBJudgeable
Next in LineGiven the ages of the youngest and middle of three children in an arithmetic sequence, print the oldest child's age.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Rotating LettersGiven a single uppercase word, decide whether every letter belongs to the set of seven letters that look the same after a 180-degree rotation.Easy2StringImplementation+2No attempts yet1s128 MBJudgeable
Speed fines are not fine!Given a speed limit and a recorded speed, decide whether the car is speeding and print the matching fine from a three-tier table.Easy2ImplementationMath+2No attempts yet2s512 MBJudgeable
Icon ScalingRead scaling factor k and print the fixed 3x3 icon with every character expanded into a k-by-k block.Easy2StringImplementationNo attempts yet2s512 MBJudgeable
Big Bang SecretsDecode an uppercase word by shifting each letter backward by S = 3P + K positions, where P is the letter's 1-based position.Easy2ImplementationString+1No attempts yet2s512 MBJudgeable
English or French?Count the letters t and T against s and S across N lines and print English if t wins, otherwise French.Easy2StringImplementationNo attempts yet2s512 MBJudgeable
What is n, Daddy?Count the ordered pairs (a, b) with 1 <= b <= a <= 5 and possibly a single hand, summing to n.Easy2MathBrute force+2No attempts yet2s512 MBJudgeable
Computer PurchaseGiven n computers with RAM, CPU speed, and disk values, sort by the score 2R + 3S + D and print the top two names, breaking ties by smaller name.Easy2SortingImplementationNo attempts yet2s512 MBJudgeable
ISBN 1-3-SumGiven the last three digits of an ISBN starting with 9780921418, compute the 1-3-sum and print it.Easy2MathImplementation+1No attempts yet1s128 MBJudgeable
Old Fishing HoleGiven three point values and a cap, enumerate every catch with at least one fish whose total points stay within the limit, in a specified order.Easy2Brute forceSimulation+1No attempts yet1s128 MBJudgeable
Good TimesGiven the time in Ottawa as hour*100+minute, print the local time in seven Canadian cities using fixed offsets, wrapping across midnight.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Body Mass IndexRead a weight and a height, compute weight divided by height squared, and print the BMI category.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Do the ShuffleSimulate a fixed 5-song playlist through button presses that rotate left, rotate right, or swap the first two songs, then print the final order.Easy2SimulationImplementation+1No attempts yet1s128 MBJudgeable
It's Cold Here!Read city names with integer temperatures, one per line, and print the name of the city with the lowest temperature.Easy2ImplementationArray+2No attempts yet1s128 MBJudgeable
Who is in the middle?Given the weights of three bowls, print the middle value among the three weights.Easy2SortingImplementationNo attempts yet1s128 MBJudgeable
I Speak TXTMSGRead lines until TTYL, map each known short form through a fixed table, and echo other lines unchanged.Easy2Hash mapString+1No attempts yet1s128 MBJudgeable
Deal or No Deal CalculatorRead eliminated case numbers and a Banker's offer, compute the average of the remaining amounts, and print deal if the offer is higher, otherwise no deal.Easy2ImplementationArray+1No attempts yet1s128 MBJudgeable
Federal Voting AgeFor each birth date, decide whether the person is at least 18 years old on February 27, 2007.Easy2ImplementationMathNo attempts yet1s128 MBJudgeable
The Cell SellGiven daytime, evening, and weekend minutes, compute the monthly cost under two phone plans and print the cheaper one.Easy2ImplementationMath+1No attempts yet1s128 MBJudgeable
Snow CallsConvert each alphanumeric phone number to digits, keep the first 10 digits, and print them in xxx-xxx-xxxx form.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
Mouse MoveThe cursor starts at (0,0) on a screen of width c and height r; each relative move is clamped to the screen edges, and the position after every move must be printed.Easy2SimulationImplementation+2No attempts yet1s128 MBJudgeable
SquaresGiven a number of tiles, find the largest integer side length whose square does not exceed that number.Easy2MathImplementation+1No attempts yet1s128 MBJudgeable
Terms of OfficePrint every year from X to Y in which all four offices change, which happens on multiples of lcm(4,2,3,5) = 60, formatted as a fixed sentence.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
Smile with SimilesGiven up to five adjectives and five nouns, print every phrase of the form "<adjective> as <noun>" in nested input order.Easy2ImplementationBrute force+2No attempts yet1s128 MBJudgeable
Simple EncryptionRemove non-letters from a message and shift each letter within its column by the alphabet position of the keyword letter above it.Easy2StringSimulation+1No attempts yet1s128 MBJudgeable
TridentPrint an ASCII trident with t tine rows, a crossbar, and h handle rows, using spacing s between the tines.Easy2ImplementationString+2No attempts yet1s128 MBJudgeable
Constrained PermutationsCount permutations of 1..n (n at most 9) that satisfy given ordering constraints x before y.Easy2Brute forceCombinatorics+2No attempts yet1s128 MBJudgeable
0123456789Read one digit from 0 to 9 and print it as a seven-segment display drawn with asterisks, three per segment, with no trailing whitespace.Easy2ImplementationSimulation+1No attempts yet1s128 MBJudgeable
AmeriCanadianRead words one per line until the line quit!, and for each word rewrite a trailing consonant followed by or as our when the word has at least five letters.Easy2StringImplementation+2No attempts yet1s128 MBJudgeable
Fraction ActionReduce a numerator and denominator to simplest form, then print it as a whole number, a proper fraction, or a mixed number.Easy2MathNumber theory+1No attempts yet1s128 MBJudgeable
Dressing UpRead an odd height H and print a bow tie of H rows where each side widens as rows approach the middle.Easy2ImplementationSimulation+1No attempts yet1s128 MBJudgeable
CalendarGiven the weekday of the 1st and the number of days, print a month calendar in a fixed weekly layout with right-aligned columns.Easy2ImplementationSimulation+1No attempts yet1s128 MBJudgeable
Cross-Number PuzzlePrint all perfect numbers from 1000 to 9999, then all three-digit numbers equal to the sum of their digits' cubes.Easy2Brute forceMath+1No attempts yet1s128 MBJudgeable
Shift LettersFor each test case, rotate the letters of a word right by n positions and print the result in a fixed sentence format.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
StringCollapse every run of identical consecutive letters in a lowercase string into a single letter and print the result.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Making test data 8Print a specific fixed graph: 98 vertices, 1501 edges forming a complete bipartite graph, using the exact listed edge order.Easy2GraphImplementation+2No attempts yet1s128 MBJudgeable
NonogramGiven a grid of black and white squares, print the lengths of the consecutive black blocks in each row and then each column.Easy2ImplementationArray+2No attempts yet1s1024 MBJudgeable
Hidden Roman NumeralsFind which of the twelve Roman numerals from 1 to 12 appear as substrings of a given string over {I,V,X}.Easy2StringImplementation+1No attempts yet1s1024 MBJudgeable
NumbersGiven three distinct digits and one of their six permutations, find that number's 1-based rank when all six permutations are sorted ascending.Easy2MathSorting+2No attempts yet1s1024 MBJudgeable
CardsA 52-card deck is missing exactly one card; given the other 51 cards as suit and value pairs, output the missing suit and value.Easy2ArrayHash map+2No attempts yet1s1024 MBJudgeable
The Worm TurnsSimulate a 20-cell worm on a 50x50 grid through a list of moves, stopping when it hits itself, leaves the board, or finishes.Easy2SimulationImplementation+2No attempts yet1s128 MBJudgeable
Counting SheepCount how many words in each list match the string "sheep" exactly, case-sensitive, and print the count per list with blank lines between cases.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
EntropyRead one line of text, count how often each character appears, and print the Shannon entropy rounded to three decimals.Easy2Hash mapMath+2No attempts yet1s128 MBJudgeable
ExpressionGiven N, build a fully parenthesized NAND (Sheffer stroke) expression for the carry-out bit by iterating a fixed string concatenation rule.Easy2StringImplementation+2No attempts yet1s128 MBJudgeable
Right Triangle CheckFor each of n triples of side lengths, decide whether the triangle is right by checking if the largest side squared equals the sum of the other two squared.Easy2MathGeometry+2No attempts yet1s128 MBJudgeable
Programming Contest PasswordsFor each test case, read a word list and participant index sequences, then print each password formed by concatenating the indexed words.Easy2ImplementationArray+1No attempts yet1s128 MBJudgeable
GaussFor each test case, compute the sum of all integers from n to m inclusive and print the test case number followed by the sum.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
StuPIdGiven an ID with one unknown digit, use the checksum rule to find the missing digit and print the corrected ID.Easy2MathImplementation+1No attempts yet3s128 MBJudgeable
Stacked BowlsGiven a string of parentheses, compute the total stack height where the first bowl adds 10 and each following bowl adds 5 if it matches the previous direction or 10 if it differs.Easy2StringSimulation+1No attempts yet1s128 MBJudgeable
Sexagenary Cycle (干支)Given a year, print its sexagenary cycle name as a branch letter A-L followed by a stem digit 0-9.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
CuboidsFor each cuboid row with one of the four values zeroed out, compute and print the missing length, width, height, or volume.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Jumbled WordsFor each line of lowercase words, keep the first and last letter of every word and reverse the letters in between.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Untied AirlinesRead each flight's complaint codes, sum the points per passenger, and count how many passengers reach 200 points.Easy2ImplementationHash mapNo attempts yet1s128 MBJudgeable
MP3 SongsRead several lists of tune names and print each list sorted alphabetically while ignoring case and keeping input order for ties.Easy2SortingString+1No attempts yet1s128 MBJudgeable
BookingsRead a flight's booked-seat count, then apply booking and cancellation lines, ignoring any that would push the count outside 0 to 68, and print the final count.Easy2SimulationImplementationNo attempts yet1s128 MBJudgeable
How Many Distinct LettersFor each line until the terminator '#', count how many distinct alphabet letters appear, ignoring case and non-letters.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
ExerciseFor each machine, multiply each exercise level's energy rate by its duration and sum the totals per person.Easy2SimulationImplementation+1No attempts yet1s128 MBJudgeable
TeleprimeGiven a six-digit number and a digit to prepend, print Yes if both the original and the resulting seven-digit number are prime.Easy2Number theoryMath+2No attempts yet1s128 MBJudgeable
JokeCount how many times the substring 'joke' appears in the input text, with line breaks treated as part of the text.Easy2StringImplementationNo attempts yet2s128 MBJudgeable
ConcertRead 10 RGB triples per data set, average each channel, and print the average rounded to the nearest integer.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
The PaintingRead an n by m grid of . and # characters and print it rotated 90 degrees clockwise, producing m rows of n characters.Easy2ArrayMatrix+1No attempts yet1s128 MBJudgeable
Ways to Make RectanglesCount the number of unordered pairs (a, b) with a <= b and a*b <= n.Easy2MathBrute force+1No attempts yet1s256 MBJudgeable
A Cat on a KeyboardGiven a text, replace each character with the keyboard row number (1 to 5) where its key sits.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
PolynomialGiven a polynomial's coefficients and an integer x, print the last three digits of |W(x)|, padded with leading zeros.Easy2MathImplementation+1No attempts yet1s128 MBJudgeable
KamilGiven a word Kamil spoke, count the words he could have meant, since each position may map to one of several letters.Easy2MathCombinatorics+1No attempts yet1s128 MBJudgeable
JulkaGiven the total apples and how many more Klaudia has, compute each girl's count.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Ant NamesGiven up to 100 lowercase names, print the maximum number of distinct letters found in any single name.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
Units Digit of a Power of TwoThe task is to print the units digit of 2 to the power n for a huge n.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Rhyming VersesCount pairs of lines with the same number of vowels and identical last k letters ignoring spaces.Easy2StringImplementationNo attempts yet1s512 MBJudgeable
Hidden NumberSum every maximal run of digits in a word of letters and digits, ignoring leading zeros.Easy2StringImplementationNo attempts yet1s256 MBJudgeable
KwadratDecide whether four given points are the vertices of a non-degenerate square with sides parallel to the axes.Easy2GeometryImplementationNo attempts yet1s128 MBJudgeable
Ranking ManipulationChoose weights on the tasks you solved so you finish first, then count the contestants tied with you.Easy2ArrayImplementationNo attempts yet1s128 MBJudgeable
Making Grid PaperPick the sheet that yields the most grid cells under the margin and spacing rules, breaking ties by area, and output its area.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Closing the CircuitShift every given upper pair forward by one position modulo n and print the sorted lower pairs after TAK.Easy2ImplementationSorting+1No attempts yet3s128 MBJudgeable
Rock Paper ScissorsCompare the two players' winning chances from their move probabilities and print who is more likely to win each match.Easy2ProbabilityMath+1No attempts yet1s128 MBJudgeable
Molar MassThe program parses each formula of C, H, O, and N with optional atom counts and prints its molar mass using the given weights.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Careless AdditionAdd two integers digit by digit from the right with no carries and print the column sums in order.Easy2ImplementationStringNo attempts yet1s128 MBJudgeable
Heeju's Math ExamSum the terms from position A to B in the sequence where each integer k appears k times in a row.Easy2SimulationImplementationNo attempts yet1s128 MBJudgeable
ClockFind the time with the median clock-hand angle among five given times, breaking angle ties by earlier time.Easy2MathSorting+1No attempts yet1s128 MBJudgeable
War GameGiven each opponent row of archers, lancers, and riders with cyclic strengths, output the shortest row that beats every soldier in meeting order.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Addition in Different BasesAdd two numbers of up to 1000 digits in bases 1 to 35, including unary base 1, and print each equation with its sum in the same base.Easy2ImplementationString+1No attempts yet1s128 MBJudgeable
WoodwormsCount the table squares each woodworm ate and report the name of the one that ate the most.Easy2MatrixImplementationNo attempts yet1s128 MBJudgeable
Air speed of a fully laden swallowYou group messy swallow flight records by subspecies and compute two average speeds for each group.Easy2ImplementationString+1No attempts yet1s128 MBJudgeable
Taunt Exposure EstimationRead CSV time measurements and estimate total exposure with the trapezoid rule, then print the range and integral with fixed rounding.Easy2ImplementationMathNo attempts yet1s128 MBJudgeable
Check DigitsRead numbers until a # line and print each with its mod-11 weighted check digit or Rejected.Easy2ImplementationMathNo attempts yet1s128 MBJudgeable
Word LadderDecide for each test case whether every consecutive word pair has equal length and differs in exactly one letter.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Crossword Puzzle Clue NumberingScan the letter grid, number each square that starts an across or down word, and list every entry number with its letter count.Easy2SimulationMatrix+1No attempts yet1s128 MBJudgeable
More DiceGiven the sum of two six-sided dice, list every unordered pair of faces that adds up to it in sorted order.Easy2Brute forceImplementationNo attempts yet1s128 MBJudgeable
Winning at tic-tac-toeTry each empty cell on the 3x3 board and print the board with the smallest winning move filled.Easy2Brute forceImplementationNo attempts yet1s128 MBJudgeable
Geometric InflationSimulate the monthly price recurrence with half-up cent rounding and print the Nth month cost with comma grouping.Easy2SimulationMath+1No attempts yet1s128 MBJudgeable
Arithmetic and Geometric SumsGiven N and the first three terms of an arithmetic or geometric series, detect the type and output the sum of the first N terms for each data set.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Monitor DPICompute horizontal and vertical DPI from diagonal size and resolution with the 16:9 ratio for each line until 0 0 0.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
MarathonerCount the listed students who finished within 6 hours and report the fastest one, breaking ties by race result order.Easy2ImplementationHash mapNo attempts yet2s64 MBJudgeable
Triangle ClassificationFor each of T triples of side lengths, output whether it is equilateral, isosceles, scalene, or not a triangle.Easy2ImplementationNo attempts yet1s128 MBJudgeable
Arbiter LoginGiven the original and entered passwords, report login success or hint at a caps lock or num lock mistake.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
The n Days of ChristmasFor each n until 0, compute the total gifts when day k of n brings k gifts down to 1.Easy2MathImplementationNo attempts yet2s128 MBJudgeable