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 results14,366 problems
| Topics | Judge | |||||
|---|---|---|---|---|---|---|
| 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 |
| Anagram CheckerDecide whether two phrases are anagrams, ignoring spaces and letters only. | Easy2 | Hash mapString+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 |
| Mod InverseGiven x and m, find n with 0 < n < m such that x*n mod m equals 1, or report that none exists. | Easy2 | Number theoryBrute force | 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 |
| AnagramsGiven two lowercase words, decide whether one can be rearranged into the other, and print the result with the words. | Easy2 | StringHash map+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 |
| Building BlocksGiven a target height N and three block heights, pick the kind whose multiples get closest to N, breaking ties by smaller block then shorter tower. | Easy2 | MathBrute force | 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 |
| AAAAHH! Overbooked!Given N event time ranges in hh:mm-hh:mm format, check whether any two events overlap in time. | Easy2 | IntervalsSorting | No attempts yet | 1s | 128 MB | Judgeable |
| DivisibilityGiven a base-62 string, decide whether the number it represents is divisible by 61. | Easy2 | MathNumber theory+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 |
| Huffman TreeGiven Z characters and arity N, decode the stored digit string into the per-character encoding. | Easy2 | TreeString+1 | No attempts yet | 3s | 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 |
| ParkFor each of up to one million heights in order, output the maximum height to its west and to its east, using its own height when no higher point exists. | Easy2 | Prefix sumArray | No attempts yet | 1s | 512 MB | Judgeable |
| Bagels on a StickSlide a chosen bagel off one end of the stick after removing the fewest bagels it cannot slide through. | Easy2 | Array | 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 |
| Caesar CipherDecode a Caesar-shifted uppercase message by matching its most frequent letter to the given original letter. | Easy2 | StringArray+1 | No attempts yet | 1s | 512 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 |
| Non-DivisorsGiven n, print the smallest and the largest integers from 1 to n that do not divide n. | Easy2 | Number theoryMath | No attempts yet | 1s | 128 MB | Judgeable |
| Sums and DifferencesCount ordered pairs from distinct positions where the difference exceeds the sum, which holds exactly when the second element is negative. | Easy2 | MathCombinatorics | No attempts yet | 1s | 128 MB | Judgeable |
| Step on the FootKozik and Adrian alternately shorten the gap by their foot lengths, and the first player facing a gap shorter than his foot wins. | Easy2 | Math | No attempts yet | 1s | 128 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 |
| Dividing the Chocolate BarTwo brothers split an a by b chocolate bar with one straight cut so the two pieces differ in area as little as possible. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Overlapping Rectangle AreaGiven two axis-aligned rectangles, compute the area of their overlapping region. | Easy2 | Geometry | No attempts yet | 1s | 128 MB | Judgeable |
| Little SnowmanChoose whether the fixed ball k is the bottom, middle, or top of a three-ball snowman with halved volumes to maximize total volume within x liters. | Easy2 | MathBrute force | No attempts yet | 1s | 128 MB | Judgeable |
| Bouncing BallGiven drop height x and target w, find the smallest number of doublings that make x reach at least w. | Easy2 | Math | No attempts yet | 1s | 512 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 |
| ThumbtacksFind the smallest jump that crosses the bridge using only planks without thumbtacks. | Easy2 | Array | No attempts yet | 1s | 128 MB | Judgeable |
| ChessEach row holds at most one rook, so take the largest value in every row with a positive maximum and add them. | Easy2 | GreedyArray | No attempts yet | 1s | 128 MB | Judgeable |
| PaintsCompute the extra red, yellow, and blue paint to buy after splitting each mixed room amount evenly between its two base colors. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Pear Trees and Apple TreesFind the largest distance between any pear tree and any apple tree in a row of n trees. | Easy2 | Array | No attempts yet | 1s | 128 MB | Judgeable |
| TournamentFor each test case with n contestants and group size k, count how many contestants can reach the final survivors under some grouping. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Missing DigitsEach cipher hides one digit as x in A or B, and you try digits 0 to 9 to find the smallest that makes A divisible by B. | Easy2 | Brute forceMath | 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 |
| MondaysGiven year length N, week length M, and starting weekday L, count the days from 1 to N that fall on the first weekday. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| KaraokeCount the starting positions where the next K characters of the song string are all vowels. | Easy2 | Sliding windowString | No attempts yet | 2s | 128 MB | Judgeable |
| Palindrome ColoringSplit each A/B string into the fewest palindromic subsequences and output that count. | Easy2 | StringTwo pointers | No attempts yet | 1s | 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 |
| Shoe FactoryChoose the price p from 1 to N that maximizes the count of buyers willing to pay p times the margin p minus K. | Easy2 | Prefix sumBrute force | No attempts yet | 1s | 128 MB | Judgeable |
| BookmakersDecide whether stakes on both match outcomes can guarantee a profit given decimal odds X and Y. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Power StripsGiven N cords and strips that add K outlets each, compute how many free outlets remain after connecting everything. | Easy2 | Math | No attempts yet | 1s | 128 MB | Judgeable |
| Changing a Light BulbCompute the sum 1 + 4 + ... + 4^(A-1) modulo 500000009 for the given level count A. | Easy2 | Math | No attempts yet | 1s | 128 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 |
| SalesFor each test case, count pairs of days where the earlier day sold no more than the later day and print the total. | Easy2 | Brute forceArray | 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 |
| 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 |