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,619 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| The Good and the BadCount the letters g and b in each hero name, ignoring case, and print whether the name is GOOD, A BADDY, or NEUTRAL. | Easy1 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| No BrainerFor each zombie, compare the number of brains it eats X with the number it needs Y, and print whether X is at least Y. | Easy1 | ImplementationBrute force | No attempts yet | 1s | 128 MB | Judgeable |
| Pair SumThis is a straightforward simulation task where numbers in each test case are used to enumerate pairs. For each input n, all pairs of distinct natural numbers with sum n are printed in lexicographic order. Because n is at most 12, iterating all possible a and b values directly works. Implemented with simple loops, this problem is a typical warm-up exercise. | Easy1 | SimulationBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| PyramidsFor each positive base size n until a terminating 0, print the total number of blocks in a pyramid whose layers count down from n to 1. | Easy1 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Battle Droid PriceFor each test case, multiply five part quantities by fixed prices, sum them, and print the total with a dollar sign and two decimals. | Easy1 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SanggeunaldGiven prices for three burgers and two drinks, print the lowest cost of one burger plus one drink minus a 50 won combo discount. | Easy1 | ImplementationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| JOI and IOICount how many length-3 windows of a string equal JOI and how many equal IOI, including overlaps. | Easy1 | StringBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Which Alien?Given the number of antennae and eyes a witness saw, print the names of all alien species whose ranges match, in the order given. | Easy1 | ImplementationBrute force+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Roll the DiceCount ordered pairs (a, b) with a from 1 to m, b from 1 to n, and a + b = 10, then print the count with singular or plural wording. | Easy1 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| A graph that times out coloring backtrackingPrint one fixed graph: a 55-vertex clique joined by a path, chosen to make a backtracking coloring solver time out. | Easy1 | GraphImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| AlienGiven a point and n axis-aligned rectangles, decide whether any rectangle contains the point, boundaries included. | Easy1 | GeometryImplementation+2 | No attempts yet | 2s | 128 MB | Judgeable |
| Grocery ShoppingPick the crab stick bag with the highest grams per won, breaking ties by the lowest price. | Easy1 | Brute forceMath | No attempts yet | 1s | 128 MB | Judgeable |
| Zero or OneGiven three bits picked by three players, print the player whose bit differs from the other two, or * if there is no such player. | Easy1 | ImplementationBrute force | No attempts yet | 1s | 512 MB | Judgeable |
| A toast that wins over the roomGiven one of eight fixed Hangul abbreviations joined by periods, print the full Korean toast phrase it stands for. | Easy1 | ImplementationString+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Two Chickens (...)Given two account balances and the price of one chicken, print the leftover total if two chickens can be afforded, otherwise the current total. | Easy1 | ImplementationMath+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Polynomial Derivative (Small)Given the nonzero terms of a polynomial, compute the value of its derivative at x = 1. | Easy1 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| FizzBuzzPrint the numbers 1 through N, writing Fizz for multiples of X, Buzz for multiples of Y, and FizzBuzz for multiples of both. | Easy1 | ImplementationMath+2 | No attempts yet | 1s | 512 MB | Judgeable |
| Sim CardFor each student, compute the smallest total cost of call minutes and data across the three fixed operator price plans. | Easy1 | ImplementationBrute force+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Linear Algebra and GroupOutput the sum of the digits appearing in the cover illustration of a specific linear algebra textbook. | Easy1 | ImplementationMath+2 | No attempts yet | 1s | 256 MB | Judgeable |
| YeeRead any amount of input, including none, and print the single word Yee. | Easy1 | ImplementationBrute force | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Easy1 | ArrayImplementation+2 | No attempts yet | 1s | 512 MB | Judgeable |
| 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. | Easy1 | MathImplementation+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Born in 1998, but 2541 in Thailand?!Given a Buddhist calendar year between 1000 and 3000, print the corresponding Gregorian year by subtracting 543. | Easy1 | MathImplementation+2 | No attempts yet | 1s | 1024 MB | Judgeable |
| RatsGiven three counts from a mark-recapture study, compute the Chapman estimator using the stated floor formula and print it. | Easy1 | MathImplementation+1 | No attempts yet | 1s | 512 MB | Judgeable |
| Extreme TemperaturesRead lines that pair a date with integer temperatures and print the smallest and largest values across every measurement. | Easy1 | ImplementationArray+2 | No attempts yet | 2s | 512 MB | Judgeable |
| The Walking AdamGiven a string of 'U' and 'D' steps, find the index of the first 'D', or the string length if no 'D' appears. | Easy1 | StringImplementation+1 | No attempts yet | 2s | 512 MB | Judgeable |
| 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. | Easy1 | MathProbability+2 | No attempts yet | 1s | 256 MB | Judgeable |
| Hansu NumbersCount integers from 1 to N (N up to 1000) whose digits form an arithmetic sequence. | Easy2 | ImplementationBrute force+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Make It DivisibleFind the smallest two-digit replacement (00-99) for the last two digits of N that makes N divisible by F. | Easy2 | Brute forceMath+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Splitting a WordSplit a lowercase word into three nonempty parts, reverse each part, and find the lexicographically smallest concatenation among all splits. | Easy2 | StringBrute force+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Choosing a Team NameCount letters L,O,V,E across a fixed name plus each candidate string, compute a formula mod 100, and print the candidate with the highest value, breaking ties by lexicographic order. | Easy2 | StringImplementation+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Yujin NumberGiven an integer up to about 2.1 billion, determine whether some split of its digits into a left and right part yields equal digit products. | Easy2 | StringBrute force+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Time MachineGiven three two-digit numbers from a digital clock, count how many of the 6 permutations form a valid HH:MM:SS time. | Easy2 | CombinatoricsBrute force+1 | No attempts yet | 2s | 128 MB | Judgeable |
| 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. | Easy2 | MathBrute force+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Counting PrimesCount how many of up to 100 given numbers (each at most 1000) are prime. | Easy2 | MathBrute force | No attempts yet | 2s | 128 MB | Judgeable |
| Restoring NumbersFor each given integer up to 100,000, output its prime factorization as prime-exponent pairs in increasing order. | Easy2 | MathNumber theory+1 | No attempts yet | 2s | 128 MB | Judgeable |
| 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. | Easy2 | MathBrute force | No attempts yet | 1s | 128 MB | Judgeable |
| Super MarioGiven 10 mushroom scores, pick a prefix sum closest to 100 (preferring the larger one on ties) as Mario's final score. | Easy2 | ArrayBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Maximum Value of a Fraction TableGiven a 2x2 grid of positive integers, find how many 90-degree clockwise rotations (0-3) maximize A/C+B/D, choosing the smallest such count on ties. | Easy2 | Brute forceImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Snow White and the Seven DwarfsGiven nine distinct numbers, find and print in increasing order the seven of them that sum to exactly 100. | Easy2 | Brute forceArray | No attempts yet | 1s | 128 MB | Judgeable |
| 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. | Easy2 | Brute forceMath | No attempts yet | 1s | 128 MB | Judgeable |
| Explicit FormulaGiven 10 binary inputs, evaluate a fixed XOR-of-ORs boolean formula (equivalently just count pairs/triplets with at least one 1 and check parity) and output the result. | Easy2 | Bit manipulationImplementation+1 | No attempts yet | 3s | 256 MB | Judgeable |
| Prerequisites?Given Freddie's chosen courses and category minimums, check whether each category has at least the required number of his courses. | Easy2 | ImplementationHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| AFC WimbledonGiven the sum and difference of two non-negative scores, print the larger score first, or -1 if no such scores exist. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Find MultiplesRead n, then read numbers until a sentinel 0, printing for each whether it is a multiple of n. | Easy2 | ImplementationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Refrigerator MagnetsRead lines until END and print each line that contains no repeated letter, ignoring spaces. | Easy2 | ImplementationString+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Gnome SequencingFor each of N triples of beard lengths, decide whether the three values are strictly increasing or strictly decreasing, then print Ordered or Unordered. | Easy2 | ImplementationSorting+2 | No attempts yet | 1s | 128 MB | Judgeable |
| St. IvesFor each floating-point n until a terminating 0, print 1 + n + n^2 + n^3 + n^4 rounded to two decimals. | Easy2 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Roaming RomansConvert each English-mile distance into Roman miles and paces using a fixed ratio, rounding the pace count to the nearest integer. | Easy2 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| The Twin ParadoxGiven Earth time and spaceship time, compute the ship's average speed as a fraction of light speed and print it to three decimals. | Easy2 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Filling Out the TeamFor each player's speed, weight, and strength, print the positions whose limits the player satisfies, in table order, or No positions. | Easy2 | ImplementationBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Next NumberGiven three distinct integers from an arithmetic or geometric progression, decide which type it is and print the label with the next term. | Easy2 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| SavingsFor each test case, print how many years of multiplying the balance by (1 + B/100) are needed until it first exceeds M. | Easy2 | SimulationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Death Knight HeroCount how many of the given ability strings avoid the forbidden substring "CD". | Easy2 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| National Collegiate Programming Contest Club FederationGiven hotels with per-person prices and weekly capacities, find the cheapest hotel and week that fit all N members within budget B. | Easy2 | Brute forceImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Card CuttingRead each game line of card values up to '*', count odd values for Cheryl and even values for Tania, and print the winner or Draw. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Map InterfaceGiven station coordinates and a visited sequence, count how many stations fall inside the smallest axis-aligned rectangle covering the visited stations. | Easy2 | ArrayImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Bailout BonusGiven a list of bailed-out companies, a tax rate, and executives with company and bonus, sum the floor of the taxed fraction for executives at bailed companies. | Easy2 | ImplementationHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Civil EngineeringRead material densities and oblong dimensions, then sum each oblong's volume times its material density for each data set. | Easy2 | ImplementationMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Chess PuzzleFor each board, read the rook coordinates and report SAFE if no two rooks share a row or column, otherwise NOT SAFE. | Easy2 | ImplementationHash map+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Escape RouteGiven your position and n-1 planet positions, find the closest planet, print both coordinates, and print the distance rounded to two decimals. | Easy2 | Brute forceMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Annoying MosquitosGiven up to 100 mosquito positions and up to 10000 swat centers, count how many mosquitos fall within the 101x101 square of at least one swat. | Easy2 | Brute forceImplementation+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Factorial BaseRead each factorial-base number, weight digit at position i (from the right, 1-indexed) by i!, and print the decimal value. | Easy2 | MathImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Head or TailFor each test case, count the zeros and ones in the list of game results and print how many games Mary and John each won. | Easy2 | ImplementationArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Pascal LibraryGiven D attendance rows over N alumni, decide whether some alumnus attended every dinner. | Easy2 | ArrayImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Math PracticeGiven A (0 to 45) and B (1 to 9), find the smallest E in 1 to 62 with E > A and 2^E starting with digit B, or 0 if none exists. | Easy2 | MathBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Odd or EvenRead N large integers up to 10^60 and print odd or even for each, judging parity from the last digit. | Easy2 | StringMath+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Barn EchoesGiven two lowercase strings, find the length of the longest string that is a prefix of one and a suffix of the other. | Easy2 | StringBrute force+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Scavenger HuntList every pair (x, y) where x divides P and y divides Q, sorted by x then y. | Easy2 | MathBrute force+1 | 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 |
| Color Me LessRead 16 target RGB colors, then map each following color to the nearest target color by Euclidean distance, breaking ties by earliest appearance. | Easy2 | ImplementationBrute force+2 | 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 |
| PerfectionFor each number below 60000, sum its proper divisors and classify it as perfect, deficient, or abundant. | Easy2 | MathNumber theory+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 |
| 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 |
| UnfriendCount the subsets of nodes in a rooted tree that can be removed, where removing a node forces removal of all its descendants. | Easy2 | TreeBrute force+1 | 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| Old BillGiven N and middle digits XYZ, fill in the first and last digits of the five-digit total so N divides it, choosing the largest valid total. | Easy2 | Brute forceMath | No attempts yet | 1s | 128 MB | Judgeable |