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,373 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
The Seven Percent SolutionRead lines until a line with only '#', replacing the seven reserved characters in each with their given percent-encodings.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
QuicksumCompute a weighted checksum for each input line: sum each character's 1-based position times its letter value, where spaces count as 0, until a line with only #.Easy2StringImplementation+2No attempts yet1s128 MBJudgeable
DoublesFor each list of 2 to 15 natural numbers ending in 0, count how many values x have 2x also in the same list.Easy2ArrayHash map+1No attempts yet1s128 MBJudgeable
Magnificent MeatballsGiven a circular list of guest meatball counts, find the position k where the sum of positions 1 through k equals the sum of the rest.Easy2ArrayPrefix sum+1No attempts yet1s128 MBJudgeable
Haiku ReviewCount vowel runs per haiku line and report whether each line has 5, 7, 5 syllables or the first line that fails.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
St. IvesFor each floating-point n until a terminating 0, print 1 + n + n^2 + n^3 + n^4 rounded to two decimals.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
Fifty Coats of GrayGiven room dimensions, opening sizes, and the area one can covers, compute the total paintable area for n apartments and round up to whole cans.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
Roaming RomansConvert each English-mile distance into Roman miles and paces using a fixed ratio, rounding the pace count to the nearest integer.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
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.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
Parlay WageringSimulate a sequence of parlay wagers: apply each money-line multiplier with truncation, skip ties, and format the final payout with commas.Easy2SimulationImplementation+1No attempts yet1s128 MBJudgeable
A Contesting DecisionGiven each team's submissions and solve times for four problems, compute solved count and penalty, then print the winner.Easy2ImplementationSimulationNo attempts yet1s128 MBJudgeable
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.Easy2ImplementationBrute force+1No attempts yet1s128 MBJudgeable
General Chemistry LabGiven a sequence of temperatures ending with 999, print each temperature's difference from the previous one, rounded to two decimals.Easy2ImplementationMath+1No attempts yet1s128 MBJudgeable
Financial ManagementGiven twelve monthly closing balances, compute the mean and print it rounded to the nearest penny with a dollar sign.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Cantor SetFor each N, print a line of 3^N characters following the Cantor set rule: each third-level block of size 3^k has its middle third blanked, dashes elsewhere.Easy2RecursionImplementation+2No attempts yet1s128 MBJudgeable
Tire DimensionsParse a tire size code and compute its overall circumference from the section width, aspect ratio, and rim diameter.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
Next NumberGiven three distinct integers from an arithmetic or geometric progression, decide which type it is and print the label with the next term.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
FIFA World CupGiven groups, teams per group, advancers per group, and byes, compute total matches played plus teams padded to the next power of two.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Number Guessing GameFor each n0, report whether 3*n0 is odd or even and print n4, the quotient of (n2*3)/9.Easy2ImplementationMath+1No attempts yet1s128 MBJudgeable
Judging OlympiaFor each line of six judge grades, discard the highest and lowest and print the average of the remaining four, stopping at the all-zero line.Easy2ImplementationMath+1No attempts yet1s128 MBJudgeable
Being Smarty!Given row R and block size N, decide whether the alternating style property P1 or P2 applies to that row.Easy2MathImplementation+1No attempts yet1s128 MBJudgeable
The Euclidean ClockGiven two clock times and a radius, find the area of the sector swept by the hour hand between them.Easy2MathGeometry+1No attempts yet1s128 MBJudgeable
ICPC Score Totalizer SoftwareFor each contestant, drop one highest and one lowest judge score, then output the truncated average of the rest.Easy2ImplementationSorting+2No attempts yet1s128 MBJudgeable
SavingsFor each test case, print how many years of multiplying the balance by (1 + B/100) are needed until it first exceeds M.Easy2SimulationMath+2No attempts yet1s128 MBJudgeable
Ah!Compare two strings of the form a...ah and print go if the first has at least as many a characters as the second.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Death Knight HeroCount how many of the given ability strings avoid the forbidden substring "CD".Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
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.Easy2Brute forceImplementationNo attempts yet1s128 MBJudgeable
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.Easy2ImplementationString+1No attempts yet1s128 MBJudgeable
Travelling SalesmanCount the distinct town names in each week's list and report the total for that week.Easy2Hash mapString+1No attempts yet1s128 MBJudgeable
Jean and Joe's ClothesRead clothing sizes and count how many items go to Joe, Jean, Jane, James, or no one, per visit until N equals 0.Easy2ImplementationSimulation+2No attempts yet1s128 MBJudgeable
DVDsApply a series of clamped sale and restock transactions to each DVD title's stock and report the final count.Easy2ImplementationSimulation+2No attempts yet1s128 MBJudgeable
NoMoPhobiaFor each week, sum de-merit points for each student from misdemeanor codes and list those reaching 100, in first-appearance order.Easy2Hash mapImplementationNo attempts yet1s128 MBJudgeable
RecipesMultiply each recipe amount by a constant and print the result as a reduced integer or mixed fraction.Easy2ImplementationMath+1No attempts yet1s128 MBJudgeable
Oil ExplorationFor each column of a grid, scan downward and sum drilling costs (H costs 3, S costs 1) until the first oil cell, or print N if none exists.Easy2ArraySimulation+1No attempts yet1s128 MBJudgeable
Map InterfaceGiven station coordinates and a visited sequence, count how many stations fall inside the smallest axis-aligned rectangle covering the visited stations.Easy2ArrayImplementation+2No attempts yet1s128 MBJudgeable
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.Easy2ImplementationHash map+2No attempts yet1s128 MBJudgeable
Isn't It Funny How a Bear Likes Honey?Given Pooh's weight and the radii of several spherical helium balloons, decide whether their combined lift strictly exceeds his weight.Easy2MathImplementation+2No attempts yet1s128 MBJudgeable
Contest SeatsCount how many participants fail to get their chosen seat, since only the first arrival for a seat can sit there.Easy2ImplementationHash map+1No attempts yet1s128 MBJudgeable
Civil EngineeringRead material densities and oblong dimensions, then sum each oblong's volume times its material density for each data set.Easy2ImplementationMath+2No attempts yet1s128 MBJudgeable
Aerospace & Mechanical EngineeringGiven each stage's mass, burn time, and thrust, simulate the rocket's vertical motion and report its height when the last stage falls off.Easy2SimulationImplementation+1No attempts yet1s128 MBJudgeable
Alphabet DistanceFor each test case, read two equal-length uppercase words and print the alphabet distance between the paired letters at every position.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
String TransformationsApply each letter-to-two-letters rule to the first occurrence of its letter in every word, updating the word after each rule.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
Error DetectionFor each 16-bit value and its transmitted check bit, decide whether the check bit matches the parity of 1-bits in the value.Easy2Bit manipulationImplementationNo attempts yet1s128 MBJudgeable
Vigenère CipherEncrypt each given plaintext with the Vigenère cipher, shifting every letter by the aligned repeated keyword letter modulo 26.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
Stacked Floating MountainsGiven several sequences, decide for each whether every element from the third onward equals the sum of the two before it.Easy2ImplementationArray+1No attempts yet1s128 MBJudgeable
Chess PuzzleFor each board, read the rook coordinates and report SAFE if no two rooks share a row or column, otherwise NOT SAFE.Easy2ImplementationHash map+2No attempts yet1s128 MBJudgeable
Checkerboard RowsFor each of B boards, read n pieces given as column-row pairs and print the largest number of pieces sharing the same row.Easy2ArrayHash map+1No attempts yet1s128 MBJudgeable
Counting Swann's CoinsPrint numbers 1 through N, replacing multiples of 3 with Dead, of 5 with Man, and of 15 with DeadMan, breaking the line after each word.Easy2ImplementationMath+1No attempts yet1s128 MBJudgeable
Fill the Rowboats!Print the numbers 1 through N, inserting the word Go! after every sixth number and after the last one.Easy2ImplementationSimulation+1No attempts yet1s128 MBJudgeable
Microsoft LogoPrint the Microsoft logo exactly as shown, matching every character, space, and line break.Easy2ImplementationNo attempts yet1s128 MBJudgeable
Secret LocationEach of six lines encodes one number by its character count; print the first three as Latitude and the last three as Longitude in the given format.Easy2StringImplementation+2No attempts yet1s128 MBJudgeable
Greatest Common DivisorRead n pairs of positive integers and print the greatest common divisor of each pair on its own line.Easy2MathNumber theory+1No attempts yet1s128 MBJudgeable
Least Common MultipleFor each of n test cases, read two natural numbers a and b and print their least common multiple.Easy2MathNumber theory+1No attempts yet1s128 MBJudgeable
J-BoxPrint an N by N grid whose border cells are '#' and interior cells are 'J', with a blank line between test cases.Easy2ImplementationSimulationNo attempts yet1s128 MBJudgeable
Mars MathEvaluate a chain of at most three Mars operations (@, %, #) on a starting number and print the result to two decimals.Easy2SimulationImplementation+1No attempts yet1s128 MBJudgeable
Letter TrianglesFor each data set, print a triangle of N lines where line i repeats the ith letter in sequence, starting from a given letter and wrapping Z to A.Easy2ImplementationString+1No attempts yet1s128 MBJudgeable
DedupeFor each of several strings, collapse every run of consecutive identical letters into a single letter and print the result.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Football TeamRead names one per line and swap every i with e and every I with E in each name.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
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.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
YodaFor each sentence, move its first two words to the end and print the result.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Escape RouteGiven your position and n-1 planet positions, find the closest planet, print both coordinates, and print the distance rounded to two decimals.Easy2Brute forceMath+1No attempts yet1s128 MBJudgeable
Total CountRead fighter names until a line with 0, print each name with its kill count in first-appearance order, then the grand total.Easy2Hash mapImplementation+2No attempts yet1s128 MBJudgeable
Target PracticePrint an n by n square border with an X drawn across the inner grid using asterisks.Easy2ImplementationSimulationNo attempts yet1s128 MBJudgeable
Which WayFor each positive integer, convert it to binary and print left, straight, or right depending on whether it has more 0s, equal 0s and 1s, or more 1s.Easy2Bit manipulationImplementation+1No attempts yet1s128 MBJudgeable
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.Easy2Brute forceImplementation+1No attempts yet1s256 MBJudgeable
Vacation HomeworkGiven L vacation days and per-day limits C and D, find the most free days after finishing A Korean and B math pages.Easy2MathGreedy+1No attempts yet1s128 MBJudgeable
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.Easy2ImplementationArray+2No attempts yet1s128 MBJudgeable
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.Easy2MathImplementation+1No attempts yet1s128 MBJudgeable
ContestGiven 20 scores, split into two groups of 10, output each group's sum of its top 3 scores.Easy2SortingImplementationNo attempts yet1s128 MBJudgeable
ChangeGiven a purchase amount below 1000 yen paid with a 1000-yen bill, find the minimum number of coins in the change.Easy2GreedyMath+1No attempts yet1s128 MBJudgeable
Caesar CipherGiven an uppercase word encrypted by shifting each letter forward three positions, shift every letter back by three to recover the original.Easy2StringImplementation+2No attempts yet1s128 MBJudgeable
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.Easy2SimulationImplementation+1No attempts yet1s128 MBJudgeable
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.Easy2ImplementationSimulation+1No attempts yet1s128 MBJudgeable
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.Easy2ImplementationMath+2No attempts yet1s128 MBJudgeable
BirthdayGiven each student's name and birthday, print the name of the youngest student, then the oldest.Easy2ImplementationSorting+1No attempts yet1s128 MBJudgeable
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.Easy2ImplementationString+1No attempts yet1s128 MBJudgeable
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.Easy2ImplementationSimulationNo attempts yet1s128 MBJudgeable
Hailstone SequencesFor each starting value H up to 500, simulate the Collatz rule and print the largest number that appears before reaching 1.Easy2SimulationImplementation+1No attempts yet1s128 MBJudgeable
Factorial BaseRead each factorial-base number, weight digit at position i (from the right, 1-indexed) by i!, and print the decimal value.Easy2MathImplementation+1No attempts yet1s128 MBJudgeable
PangramRead sentences until a line holding a single asterisk, and print Y if a sentence contains all 26 lowercase letters, otherwise N.Easy2StringHash map+1No attempts yet1s128 MBJudgeable
Jingle ComposingSplit a slash-delimited composition into measures and count how many note durations sum exactly to 1.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
FeynmanFor each N, count all axis-aligned squares contained in an N by N grid of unit cells, ending at the sentinel 0.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Weekend LotteryGiven N past draws of C distinct numbers from 1 to K, print all numbers that appeared the fewest times, in increasing order.Easy2ArrayImplementationNo attempts yet3s128 MBJudgeable
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.Easy2ImplementationArray+1No attempts yet1s128 MBJudgeable
Pascal LibraryGiven D attendance rows over N alumni, decide whether some alumnus attended every dinner.Easy2ArrayImplementation+1No attempts yet1s128 MBJudgeable
Grade StatisticsFor each class, read the scores, then report the maximum, the minimum, and the largest gap between neighboring scores after sorting in descending order.Easy2SortingImplementation+1No attempts yet1s128 MBJudgeable
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.Easy2ImplementationString+1No attempts yet1s128 MBJudgeable
Breed ProximityGiven a line of N cows with breed ids, find the largest breed id whose two occurrences lie within K positions of each other, or -1 if none exist.Easy2ArrayHash map+1No attempts yet1s128 MBJudgeable
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.Easy2MathImplementation+1No attempts yet1s128 MBJudgeable
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.Easy2MathBrute force+1No attempts yet1s128 MBJudgeable
Odd or EvenRead N large integers up to 10^60 and print odd or even for each, judging parity from the last digit.Easy2StringMath+2No attempts yet1s128 MBJudgeable
Barn EchoesGiven two lowercase strings, find the length of the longest string that is a prefix of one and a suffix of the other.Easy2StringBrute force+2No attempts yet1s128 MBJudgeable
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.Easy2SimulationArray+2No attempts yet1s128 MBJudgeable
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.Easy2ImplementationSimulation+1No attempts yet1s128 MBJudgeable
StatisticsRead N integers, print their mean and median rounded to six decimal places.Easy2ArraySorting+2No attempts yet1s128 MBJudgeable
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.Easy2ImplementationSimulation+2No attempts yet1s128 MBJudgeable
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.Easy2StringImplementation+2No attempts yet1s128 MBJudgeable
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.Easy2ImplementationBrute force+2No attempts yet1s128 MBJudgeable
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.Easy2ImplementationMath+1No attempts yet1s128 MBJudgeable
Getting ChordedGiven three note names, decide whether their semitone spacing forms a major or minor chord, then print the echo with the root-named chord or "unrecognized".Easy2ImplementationMath+1No attempts yet1s128 MBJudgeable