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
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| 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. | Easy2 | ImplementationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Ballot EvaluationSum the given parties' vote percentages and check the sum against an integer n using the guess's comparison operator. | Easy2 | Hash mapImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | StringHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Hard to Believe, but True!Read the numbers in each equation backwards, add them, and check whether the sum equals the backwards-read result. | Easy2 | StringMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Next in LineGiven the ages of the youngest and middle of three children in an arithmetic sequence, print the oldest child's age. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | ImplementationMath+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Icon ScalingRead scaling factor k and print the fixed 3x3 icon with every character expanded into a k-by-k block. | Easy2 | StringImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Easy2 | ImplementationString+1 | No attempts yet | 2s | 512 MB | Judgeable |
| English or French?Count the letters t and T against s and S across N lines and print English if t wins, otherwise French. | Easy2 | StringImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| What is n, Daddy?Count the ordered pairs (a, b) with 1 <= b <= a <= 5 and possibly a single hand, summing to n. | Easy2 | MathBrute force+2 | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Easy2 | SortingImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| ISBN 1-3-SumGiven the last three digits of an ISBN starting with 9780921418, compute the 1-3-sum and print it. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | Brute forceSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Good TimesGiven the time in Ottawa as hour*100+minute, print the local time in seven Canadian cities using fixed offsets, wrapping across midnight. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Body Mass IndexRead a weight and a height, compute weight divided by height squared, and print the BMI category. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| It's Cold Here!Read city names with integer temperatures, one per line, and print the name of the city with the lowest temperature. | Easy2 | ImplementationArray+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Who is in the middle?Given the weights of three bowls, print the middle value among the three weights. | Easy2 | SortingImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| I Speak TXTMSGRead lines until TTYL, map each known short form through a fixed table, and echo other lines unchanged. | Easy2 | Hash mapString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | ImplementationArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Federal Voting AgeFor each birth date, decide whether the person is at least 18 years old on February 27, 2007. | Easy2 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| The Cell SellGiven daytime, evening, and weekend minutes, compute the monthly cost under two phone plans and print the cheaper one. | Easy2 | ImplementationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Snow CallsConvert each alphanumeric phone number to digits, keep the first 10 digits, and print them in xxx-xxx-xxxx form. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SquaresGiven a number of tiles, find the largest integer side length whose square does not exceed that number. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Smile with SimilesGiven up to five adjectives and five nouns, print every phrase of the form "<adjective> as <noun>" in nested input order. | Easy2 | ImplementationBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Simple EncryptionRemove non-letters from a message and shift each letter within its column by the alphabet position of the keyword letter above it. | Easy2 | StringSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| TridentPrint an ASCII trident with t tine rows, a crossbar, and h handle rows, using spacing s between the tines. | Easy2 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Constrained PermutationsCount permutations of 1..n (n at most 9) that satisfy given ordering constraints x before y. | Easy2 | Brute forceCombinatorics+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | ImplementationSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Fraction ActionReduce a numerator and denominator to simplest form, then print it as a whole number, a proper fraction, or a mixed number. | Easy2 | MathNumber theory+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Dressing UpRead an odd height H and print a bow tie of H rows where each side widens as rows approach the middle. | Easy2 | ImplementationSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| CalendarGiven the weekday of the 1st and the number of days, print a month calendar in a fixed weekly layout with right-aligned columns. | Easy2 | ImplementationSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Cross-Number PuzzlePrint all perfect numbers from 1000 to 9999, then all three-digit numbers equal to the sum of their digits' cubes. | Easy2 | Brute forceMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Shift LettersFor each test case, rotate the letters of a word right by n positions and print the result in a fixed sentence format. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| StringCollapse every run of identical consecutive letters in a lowercase string into a single letter and print the result. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Making test data 8Print a specific fixed graph: 98 vertices, 1501 edges forming a complete bipartite graph, using the exact listed edge order. | Easy2 | GraphImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| NonogramGiven a grid of black and white squares, print the lengths of the consecutive black blocks in each row and then each column. | Easy2 | ImplementationArray+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| Hidden Roman NumeralsFind which of the twelve Roman numerals from 1 to 12 appear as substrings of a given string over {I,V,X}. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 1024 MB | Judgeable |
| NumbersGiven three distinct digits and one of their six permutations, find that number's 1-based rank when all six permutations are sorted ascending. | Easy2 | MathSorting+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| 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. | Easy2 | ArrayHash map+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| 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. | Easy2 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| EntropyRead one line of text, count how often each character appears, and print the Shannon entropy rounded to three decimals. | Easy2 | Hash mapMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| ExpressionGiven N, build a fully parenthesized NAND (Sheffer stroke) expression for the carry-out bit by iterating a fixed string concatenation rule. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | MathGeometry+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Programming Contest PasswordsFor each test case, read a word list and participant index sequences, then print each password formed by concatenating the indexed words. | Easy2 | ImplementationArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| StuPIdGiven an ID with one unknown digit, use the checksum rule to find the missing digit and print the corrected ID. | Easy2 | MathImplementation+1 | No attempts yet | 3s | 128 MB | Judgeable |
| 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. | Easy2 | StringSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Sexagenary Cycle (干支)Given a year, print its sexagenary cycle name as a branch letter A-L followed by a stem digit 0-9. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| CuboidsFor each cuboid row with one of the four values zeroed out, compute and print the missing length, width, height, or volume. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Jumbled WordsFor each line of lowercase words, keep the first and last letter of every word and reverse the letters in between. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Untied AirlinesRead each flight's complaint codes, sum the points per passenger, and count how many passengers reach 200 points. | Easy2 | ImplementationHash map | No attempts yet | 1s | 128 MB | Judgeable |
| MP3 SongsRead several lists of tune names and print each list sorted alphabetically while ignoring case and keeping input order for ties. | Easy2 | SortingString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | SimulationImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| How Many Distinct LettersFor each line until the terminator '#', count how many distinct alphabet letters appear, ignoring case and non-letters. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| ExerciseFor each machine, multiply each exercise level's energy rate by its duration and sum the totals per person. | Easy2 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| TeleprimeGiven a six-digit number and a digit to prepend, print Yes if both the original and the resulting seven-digit number are prime. | Easy2 | Number theoryMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| JokeCount how many times the substring 'joke' appears in the input text, with line breaks treated as part of the text. | Easy2 | StringImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| ConcertRead 10 RGB triples per data set, average each channel, and print the average rounded to the nearest integer. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| The PaintingRead an n by m grid of . and # characters and print it rotated 90 degrees clockwise, producing m rows of n characters. | Easy2 | ArrayMatrix+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Ways to Make RectanglesCount the number of unordered pairs (a, b) with a <= b and a*b <= n. | Easy2 | MathBrute force+1 | No attempts yet | 1s | 256 MB | Judgeable |
| A Cat on a KeyboardGiven a text, replace each character with the keyboard row number (1 to 5) where its key sits. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| PolynomialGiven a polynomial's coefficients and an integer x, print the last three digits of |W(x)|, padded with leading zeros. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| KamilGiven a word Kamil spoke, count the words he could have meant, since each position may map to one of several letters. | Easy2 | MathCombinatorics+1 | No attempts yet | 1s | 128 MB | Judgeable |
| JulkaGiven the total apples and how many more Klaudia has, compute each girl's count. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Ant NamesGiven up to 100 lowercase names, print the maximum number of distinct letters found in any single name. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Units Digit of a Power of TwoThe task is to print the units digit of 2 to the power n for a huge n. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Rhyming VersesCount pairs of lines with the same number of vowels and identical last k letters ignoring spaces. | Easy2 | StringImplementation | No attempts yet | 1s | 512 MB | Judgeable |
| Hidden NumberSum every maximal run of digits in a word of letters and digits, ignoring leading zeros. | Easy2 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| KwadratDecide whether four given points are the vertices of a non-degenerate square with sides parallel to the axes. | Easy2 | GeometryImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Ranking ManipulationChoose weights on the tasks you solved so you finish first, then count the contestants tied with you. | Easy2 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Closing the CircuitShift every given upper pair forward by one position modulo n and print the sorted lower pairs after TAK. | Easy2 | ImplementationSorting+1 | No attempts yet | 3s | 128 MB | Judgeable |
| Rock Paper ScissorsCompare the two players' winning chances from their move probabilities and print who is more likely to win each match. | Easy2 | ProbabilityMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Careless AdditionAdd two integers digit by digit from the right with no carries and print the column sums in order. | Easy2 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| Heeju's Math ExamSum the terms from position A to B in the sequence where each integer k appears k times in a row. | Easy2 | SimulationImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| ClockFind the time with the median clock-hand angle among five given times, breaking angle ties by earlier time. | Easy2 | MathSorting+1 | No attempts yet | 1s | 128 MB | Judgeable |
| War GameGiven each opponent row of archers, lancers, and riders with cyclic strengths, output the shortest row that beats every soldier in meeting order. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| WoodwormsCount the table squares each woodworm ate and report the name of the one that ate the most. | Easy2 | MatrixImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Air speed of a fully laden swallowYou group messy swallow flight records by subspecies and compute two average speeds for each group. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Taunt Exposure EstimationRead CSV time measurements and estimate total exposure with the trapezoid rule, then print the range and integral with fixed rounding. | Easy2 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Check DigitsRead numbers until a # line and print each with its mod-11 weighted check digit or Rejected. | Easy2 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Word LadderDecide for each test case whether every consecutive word pair has equal length and differs in exactly one letter. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | SimulationMatrix+1 | No attempts yet | 1s | 128 MB | Judgeable |
| More DiceGiven the sum of two six-sided dice, list every unordered pair of faces that adds up to it in sorted order. | Easy2 | Brute forceImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Winning at tic-tac-toeTry each empty cell on the 3x3 board and print the board with the smallest winning move filled. | Easy2 | Brute forceImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Geometric InflationSimulate the monthly price recurrence with half-up cent rounding and print the Nth month cost with comma grouping. | Easy2 | SimulationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Monitor DPICompute horizontal and vertical DPI from diagonal size and resolution with the 16:9 ratio for each line until 0 0 0. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| MarathonerCount the listed students who finished within 6 hours and report the fastest one, breaking ties by race result order. | Easy2 | ImplementationHash map | No attempts yet | 2s | 64 MB | Judgeable |
| Triangle ClassificationFor each of T triples of side lengths, output whether it is equilateral, isosceles, scalene, or not a triangle. | Easy2 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Arbiter LoginGiven the original and entered passwords, report login success or hint at a caps lock or num lock mistake. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| The n Days of ChristmasFor each n until 0, compute the total gifts when day k of n brings k gifts down to 1. | Easy2 | MathImplementation | No attempts yet | 2s | 128 MB | Judgeable |