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 results2,994 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| Garbled MessageRead lines of garbled text until EOF and replace every occurrence of the substring "iiing" with "th", preserving all other characters and line breaks. | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Target PracticePrint an n by n square border with an X drawn across the inner grid using asterisks. | Easy2 | ImplementationSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| LeagueGiven every match result in a round-robin soccer league, compute each team's total points and print its rank, where tied teams share the best rank. | Easy2 | ImplementationArray+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Dice GameSimulate a piece on a board of cells, applying a die roll then the cell's instruction, and report how many rolls reach the goal. | Easy2 | SimulationArray | No attempts yet | 1s | 128 MB | Judgeable |
| Time CardGiven clock-in and clock-out times for three employees in h m s form, print each employee's working duration as hours, minutes, and seconds. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Caesar CipherGiven an uppercase word encrypted by shifting each letter forward three positions, shift every letter back by three to recover the original. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Card Flipping GameGiven two rows of n digit cards, reveal pairs left to right; the larger card wins both cards' sum, and equal cards each keep their own. | Easy2 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Tunnel Entrance and ExitTrack the number of cars in a tunnel each minute from entrance and exit counts, and print the maximum count, or 0 if it ever goes negative. | Easy2 | ImplementationSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Triangle Validity and ClassificationRead lines of three side lengths, count valid triangles as right, acute, or obtuse, and stop at the first line that is not a triangle. | Easy2 | ImplementationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Comparison OperatorsRead C comparison expressions with integer operands, evaluate each, and print "Case N: true" or "Case N: false" until a line with operator E ends input. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| BakuganGiven each player's monster sequence over at most 10 rounds, add points per round and award a one-time 30-point bonus for the first three-in-a-row, then name the winner. | Easy2 | ImplementationSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Hailstone SequencesFor each starting value H up to 500, simulate the Collatz rule and print the largest number that appears before reaching 1. | Easy2 | SimulationImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Roll-call in Woop Woop HighRead each class's answers and count pupils into four groups: correct first try, correct late, never correct, and absent. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Contest TimingShe starts at 11:11 on 11/11. Given the day, hour, and minute she stops, print the minutes elapsed, or -1 if the stop is earlier. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| String Function EncodingApply the given suffix-plus-string operation C times to each input string and print the results. | Easy2 | StringSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Papaya JungleBessie moves greedily through a grid, always stepping to the adjacent square with the most uneaten papayas, and we sum the fruit she eats until she reaches the bottom-right corner. | Easy2 | SimulationArray+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Time CardsFor each cow, pair her START and STOP entries and print the total time she spent at the milking machine as hours and minutes. | Easy2 | ImplementationSimulation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| TV ReportsTrack daily Dollar prices against the previous day and the running all-time high, printing NTV drop headlines and BBTV record headlines in day order. | Easy2 | ImplementationSimulation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| IBM Minus OneFor each of n uppercase names, shift every letter to the next letter of the alphabet, wrapping Z to A, and print the result with numbered headers. | Easy2 | StringImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Approximating ePrint approximations of e for n from 0 to 9, each rounded to 9 decimals with trailing zeros removed, under a fixed two-line header. | Easy2 | ImplementationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| 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 |
| 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 |
| Sumac SequencesStarting from two integers, repeatedly replace the pair with (second, first minus second) until the difference turns negative and report how many terms appear. | Easy2 | SimulationMath | 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| WarehouseTally up to a million signed per-product shipment records and print the remaining stock of each product in alphabetical order. | Easy2 | ArraySimulation | No attempts yet | 1s | 512 MB | Judgeable |
| Rock Paper ScissorsSimulate k rounds of rock-paper-scissors across N robots, removing round losers until one robot remains or all rounds end in a draw. | Easy2 | Simulation | No attempts yet | 1s | 128 MB | Judgeable |
| TurtleSimulate the turtle's moves from the origin and report the area of the axis-aligned bounding box of its path. | Easy2 | Simulation | 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 |
| Guess the SongGiven the title words and the lyrics in order, find the earliest lyric position where at least half of the distinct title words have appeared. | Easy2 | SimulationHash map | No attempts yet | 1s | 128 MB | Judgeable |
| DisplayAdd K consecutive numbers starting from the B-th value of a length-N sequence that repeats forever. | Easy2 | ArraySimulation | No attempts yet | 1s | 128 MB | Judgeable |
| TrainPassengers board in order into the non-full car with the fewest same-initial riders, ties broken by load then car number, and the program prints each car count. | Easy2 | SimulationArray | No attempts yet | 1s | 128 MB | Judgeable |
| DisplayFit the words of a space-separated text into the fewest rows of width w, breaking a row only when the next word does not fit. | Easy2 | GreedySimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Consecutive Digits in a Rational NumberReport the base-7 digits in positions f through l after the point for the fraction n over d. | Easy2 | SimulationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Pig LatinConvert each word to Pig Latin by moving leading consonants to the end and appending ay. | Easy2 | StringSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| W**h y**r mouth out with s**pReplace the middle two letters of every four-letter run whose first and last letters match the given list, scanning each line left to right with no overlap. | Easy2 | StringSimulation | 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 |
| Painting PartyPaint up to 100 filled or one-pixel-border rectangles in order on an N by N grid and print the final colors. | Easy2 | SimulationMatrix | No attempts yet | 5s | 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 |
| Sequence Folding GameRepeatedly fold the list by adding symmetric pairs until two numbers remain, then Alice wins when the first is larger. | Easy2 | SimulationArray | No attempts yet | 1s | 128 MB | Judgeable |
| Gholam's Simple GameStarting from the marked tile and direction, walk n steps bouncing off both ends and count visits to yellow tiles. | Easy2 | SimulationArray | No attempts yet | 1s | 128 MB | Judgeable |
| Zombie InvasionProcess villages east to west, moving half of each village west and leaving at most one behind, with everything gathering on the west coast. | Easy2 | SimulationMath | No attempts yet | 2s | 128 MB | Judgeable |
| BoxesBoxes fall straight down in each column of a grid, and the program sums how many cells all boxes move. | Easy2 | SimulationMatrix | No attempts yet | 1s | 256 MB | Judgeable |
| Perfect ShuffleInterleave the top and bottom halves of a card list to perform one perfect shuffle for each test case. | Easy2 | SimulationArray | No attempts yet | 1s | 128 MB | Judgeable |
| Text RollSimulate a ball that rolls right over non-space characters and drops down through spaces until it falls off the last line, then report its exit column. | Easy2 | Simulation | No attempts yet | 1s | 128 MB | Judgeable |
| I Love CroatiaTrack the 210 seconds of answers and pass the bomb left on each correct answer to find who holds it when it explodes. | Easy2 | Simulation | No attempts yet | 1s | 128 MB | Judgeable |
| Roman Catholic MassThe program seats the latecomer in the empty spot with the most occupied neighbors and counts every adjacent occupied pair once. | Easy2 | Brute forceMatrix+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Arithmetic with MorseYou sum each Morse number from its symbol values and evaluate the expression with multiplication before addition. | Easy2 | ImplementationSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Presidential ElectionEach voter ranks all candidates, and the program counts first-choice votes and then a top-two runoff to report the winner and the deciding round. | Easy2 | SimulationImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Show Me The OperatorsEvaluate each space-separated expression in two left-to-right sweeps and print the operators in execution order with the final value. | Easy2 | SimulationImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Fibonacci remainderFor each test case, compute the P-th Fibonacci number of the sequence starting 1, 1 modulo Q and print it as Case #x: M. | Easy2 | MathSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Cuckoo for HashingSimulate cuckoo hashing insertions into two mod-indexed tables with displacement and print the final table contents. | Easy2 | SimulationHash map+1 | No attempts yet | 2s | 128 MB | Judgeable |
| UndercutAdd up both players' scores across card rounds where the higher card scores unless the lower card is exactly one less. | Easy2 | SimulationImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| LampGuards patrol in roster order, each toggling the lamps in one arithmetic progression, and you report how many lamps stay on. | Easy2 | SimulationArray | No attempts yet | 1s | 128 MB | Judgeable |
| Cellular AutomataSimulate all 64 update rules for g generations on the n by n grid and print the smallest rule that turns the start state into the end state. | Easy2 | Brute forceSimulation | No attempts yet | 2s | 1024 MB | Judgeable |
| CarsSimulate n cars adjusting speed by 5 m/s every 5 seconds to keep gaps within 80 to 100 meters, and output -1 on collision or the front car distance. | Easy2 | SimulationImplementation | No attempts yet | 2s | 1024 MB | Judgeable |
| The Euclidean AlgorithmCount how many subtraction steps the original Euclidean algorithm needs to find the gcd of two integers up to 32767. | Easy2 | SimulationMath | No attempts yet | 1s | 128 MB | Judgeable |
| VoteEach judge votes for the most interesting game they can afford, and the game with the most votes wins. | Easy2 | SimulationArray | No attempts yet | 1s | 128 MB | Judgeable |
| Party InvitationSimulate m rounds of removing every person at a multiple of ri from the ordered list and print the survivors in order. | Easy2 | SimulationArray | No attempts yet | 2s | 256 MB | Judgeable |
| Magic SquaresCheck each test case square by comparing every row, column, and both diagonal sums and report whether it is magic. | Easy2 | MatrixSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Clean UpRecompute each of the nine batting averages after adding the new series and reorder the lineup around the new best average. | Easy2 | SimulationImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Milo of Croton and the CalfSimulate Milo lifting the calf as it gains a pound a day, with strength gains after 3 days and soreness lasting 2 days, and report the first failure day. | Easy2 | Simulation | No attempts yet | 1s | 256 MB | Judgeable |
| Train PassengersDecide if per-station counts of passengers leaving, boarding, and left waiting fit the train capacity and boarding rules. | Easy2 | SimulationImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Van Gogh's Work ScheduleSimulate a first-come queue of painting jobs and print arrivals, starts, and finishes for hours 0 to 23. | Easy2 | SimulationQueue | No attempts yet | 1s | 64 MB | Judgeable |
| MiscalculationGiven a digit expression with + and * and Bob's answer, report whether it matches the precedence evaluation, the left-to-right evaluation, both, or neither. | Easy2 | Simulation | No attempts yet | 1s | 256 MB | Judgeable |
| Turtle GraphicsSimulate a turtle that steps forward and turns on a 64 by 64 grid, then report its final cell and how many cells it visited more than once. | Easy2 | SimulationArray | No attempts yet | 1s | 256 MB | Judgeable |
| Joy of FlightAdd up the wind drift over k seconds and, if the remaining distance fits the speed limit, print the evenly paced flight positions. | Easy2 | ImplementationSimulation+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Anniversary 1Starting from April 2, 2014 as day 1, add N-1 days with leap years and print the date as YYYY-MM-DD. | Easy2 | SimulationImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Anniversary 2Given a start date as day 1 and a number N, print the date N minus 1 days later following the given leap year rules. | Easy2 | SimulationImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| The Wet KeypadGiven a permuted phone keypad, encode a message of up to 100 letters into multi-tap presses with # separators. | Easy2 | ImplementationSimulation | No attempts yet | 1s | 32 MB | Judgeable |
| FilterThe program checks each Bloom filter against every queried user id and lists the files that may hold at least one of them. | Easy2 | SimulationImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Urdu orthography verificationCheck whether each encoded Urdu letter uses the detached, initial, medial or final shape required by its position and the two special vowels. | Easy2 | SimulationImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Paprika ID CardsSimulate one left-to-right pass of conditional card swaps, then count paprikas whose final card matches their goal. | Easy2 | SimulationArray | No attempts yet | 1s | 256 MB | Judgeable |
| Weather ForecasterClouds drift east one cell per minute, and each cell reports how many minutes until a cloud first arrives, or -1 if none ever does. | Easy2 | SimulationArray | No attempts yet | 1s | 256 MB | Judgeable |
| Wait TimeReconstruct message timestamps from the log and sum each friend reply wait time, reporting -1 for a friend with an unanswered message. | Easy2 | SimulationHash map | No attempts yet | 1s | 256 MB | Judgeable |
| Reversing basketsApply M given interval reversals in order to baskets numbered 1 to N, then print the final order from the left. | Easy2 | ArraySimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Rotating the basket orderPerform M given segment rotations on baskets numbered 1 to N and print the final left-to-right order. | Easy2 | SimulationArray | No attempts yet | 1s | 256 MB | Judgeable |
| BeltsGiven each belt rotation ratio and twist, compute the last wheel speed and direction when the first wheel turns clockwise once per minute. | Easy2 | SimulationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Inverse Move-to-Front TransformReconstruct the lowercase string from its move-to-front code by simulating the 26-letter list. | Easy2 | SimulationArray | No attempts yet | 2s | 256 MB | Judgeable |
| Rocket height at last separationSimulate n rocket stages with the given thrust, mass, and burn time formulas and print the height when the last stage drops. | Easy2 | SimulationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Sieve of EratosthenesSimulate the sieve of Eratosthenes as described and print the K-th crossed-out number for each N and K pair. | Easy2 | SimulationImplementation | No attempts yet | 1s | 256 MB | Judgeable |