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,390 problems
| Title | Level | Topics | Solved | Time limit | Memory limit | Judge |
|---|---|---|---|---|---|---|
| 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 |
| Long is a train, a train is fast, fast is a planeCompute the travel time gap between a slower train and a faster plane over M km and print each gap as rounded H:MM:SS. | Easy2 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Perfect Number CheckDecide whether each given integer equals the sum of its proper divisors and print the equation or a negative verdict. | Easy2 | Number theoryImplementation | No attempts yet | 2s | 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 |
| Contest Venue SetupCount the schools that have two of their teams seated in king-adjacent cells of an N by M grid with empty seats. | Easy2 | MatrixImplementation | 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 |
| Qurban 2011Given buffalo part orders and sheep orders, round buffalo parts up by seven and pack the animals into trips of three buffaloes or six sheep. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| BeeThe program counts logged jobs under each of seven bee work codes and prints each count with its share of the total. | Easy2 | ImplementationArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Easy EncryptionEach letter becomes its two-digit code and each digit gains a # prefix while other characters stay unchanged. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Form GuideParse home and away scorelines into win, draw, and loss marks, print the overall, home, and away form strings, and report the longest run of each mark. | Easy2 | ImplementationString | No attempts yet | 1s | 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 |
| 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 |
| Zeros in a FactorialCount how many zero digits appear in the decimal representation of n factorial for a given n below 100. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| RouteCount the maximal runs of level, uphill, and downhill metre sections along the looped jogging route starting at pole 1. | Easy2 | ArrayImplementation | No attempts yet | 2s | 1024 MB | Judgeable |
| Centroid of Point MassesCompute the mass-weighted average x and y over each point set and print each centroid rounded to two decimals. | Easy2 | MathImplementation | No attempts yet | 3s | 128 MB | Judgeable |
| Have you had your birthday yet?For each birth date, tell whether its 2007 birthday already passed relative to 4 August, with special outputs for 4 August and 29 February. | Easy2 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Cedric's cypherDecrypt each Caesar-ciphered line using the trailing encrypted A to recover the shift and drop that marker. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| The Hardest Problem EverDecode each START/END block by shifting every uppercase letter five places back and leaving other characters unchanged. | Easy2 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Polar ExplorerGiven planet radius, fuel, and the angle to the crash site, decide if the round trip on the shorter arc fits and report leftover fuel or reachable miles. | Easy2 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| HMs and TMsFind all of the first 151 Pokémon that can learn every HM or TM move on the given list and print their numbers in order. | Easy2 | ImplementationBrute force | No attempts yet | 1s | 128 MB | Judgeable |
| Assigning PartnersYou check that every positional pairing is mutual and no student is paired with themselves. | Easy2 | Hash mapImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Focal Length of a LensGiven object and image distances for each test case, compute the lens focal length and print it rounded to one decimal place. | Easy2 | MathImplementation | 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 |
| Word SwapSum the per-position letter differences between each pair of equal-length words and report the coins earned, paid, or free. | Easy2 | ImplementationString | No attempts yet | 1s | 256 MB | Judgeable |
| Aligned CalendarConvert each Gregorian date into the 13-month calendar with 28-day months and report the leftover days as holidays. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Odysseus and the SirensThe program scores every melody under each candidate key by summing note penalties and prints the numbered key with the smallest total. | Easy2 | ImplementationString+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Toroidal gridPrint the given snake sweep of columns 0 to n-2 plus the climb up column n-1 to list a Hamiltonian cycle of the m by n toroidal grid. | Easy2 | ImplementationGraph | 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 |
| Runway PlanningGiven each heading in degrees, compute the two-digit runway number by rounding and folding to the range 1 to 18. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Amino AcidParse each formula into element counts and print the molecular weight, or Invalid formula for other elements. | Easy2 | StringImplementation | No attempts yet | 1s | 64 MB | Judgeable |
| Alarm ClockPrint the earliest hh:mm time whose four digits use exactly n lit segments, or Impossible when no such time exists. | Easy2 | Brute forceImplementation | No attempts yet | 2s | 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 |
| EligibilityDecide each student contest status from study start year, birth year, and completed courses under four ordered rules. | Easy2 | Implementation | 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 |
| TorusPrint 1 for each test case followed by the prescribed vertex order that visits every vertex of the toroidal lattice exactly once. | Easy2 | Implementation | No attempts yet | 1s | 256 MB | Judgeable |
| Queens on Bad TermsCheck an 8x8 board holding eight queens and print valid only when no two queens share a row, column, or diagonal. | Easy2 | ImplementationMatrix | No attempts yet | 1s | 256 MB | Judgeable |
| Hitting the TargetsCount, for each of up to 100 shot points, how many of up to 30 given rectangles and circles contain it, boundaries included. | Easy2 | GeometryImplementation | No attempts yet | 2s | 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 |
| Most Chosen NumberPick the number that appears most often in each test case, breaking ties by the smaller number. | Easy2 | ArrayImplementation | No attempts yet | 5s | 256 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 |
| Working HoursAdd signed hour and minute terms in a flexible format and print each total as H:MM. | Easy2 | ImplementationString+1 | No attempts yet | 2s | 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 |
| Crossword Clue NumberingScan the grid for empty cells that begin a word of at least three cells across or down and print them in reading order. | Easy2 | ImplementationMatrix | No attempts yet | 1s | 256 MB | Judgeable |
| Cow RoutingFind the cheapest single flight route on which city A appears before city B, or report -1 when none exists. | Easy2 | ImplementationArray | No attempts yet | 1s | 256 MB | Judgeable |
| Date in SeoulAdd nine hours to the given UTC date output and print the resulting Seoul calendar date as YYYY-MM-DD. | Easy2 | Implementation | No attempts yet | 1s | 256 MB | Judgeable |
| RövarspråketTranslate one lowercase word by expanding each consonant into three letters under the given vowel and consonant rules. | Easy2 | ImplementationString | No attempts yet | 1s | 256 MB | Judgeable |
| Four NumbersAdd the two numbers formed by writing B directly after A and D directly after C. | Easy2 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| International MeetingConvert a HH:MM meeting time from one UTC offset to N coworker offsets and print each local time of day. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| SHA-256Print the SHA-256 hash of the given string as 64 lowercase hexadecimal digits. | Easy2 | Implementation | No attempts yet | 1s | 256 MB | Judgeable |
| Base Conversion 2Convert the decimal number N to base B, writing digits above 9 as uppercase letters. | Easy2 | MathImplementation | No attempts yet | 0.5s | 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 |
| Entrance ExaminationPick the cutoff n between nmin and nmax with a strict score split that maximizes the gap between the lowest passing and highest failing scores. | Easy2 | ArrayImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| ICPC CalculatorEvaluate a dot-indented prefix expression where + sums its operands and * multiplies them. | Easy2 | RecursionTree+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Pythagorean ExpectationAdd up each team's scored and allowed runs from the match records, apply the given formula, and print the largest and smallest values scaled by 1000. | Easy2 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Painting FloorsPrint the leftmost cell of every horizontal bare run so the prescribed plan covers all bare squares. | Easy2 | Implementation | No attempts yet | 2s | 256 MB | Judgeable |
| Kkung's Girlfriend PlanEach test case gives named condition times and AND-OR combos, and the answer is the smallest combo time where one combo takes its slowest condition. | Easy2 | ImplementationHash map+1 | No attempts yet | 1s | 256 MB | Judgeable |
| The Traveling OrienteererGiven point coordinates and lists of courses, compute each course total Euclidean length rounded to the nearest integer. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Is It a Number?Check whether each line holds only digits with optional surrounding spaces and print the number without leading zeros or invalid input. | Easy2 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Decode the MessageThe program decodes each word into one character from its letter values modulo 27. | Easy2 | StringMath+1 | No attempts yet | 1s | 256 MB | Judgeable |
| ElectionFor each test case, count how many coins overlap each coin and print the top name or TIE on ties. | Easy2 | GeometryBrute force+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Black FridayGiven each person's die roll, print the number of the person holding the highest roll that no one else rolled, or none. | Easy2 | ArrayImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Choosing an Exam SetYou compare exam sets by random-guess expected score and pick the highest, preferring fewer questions then the smaller number. | Easy2 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| ITAI VirusCount the initially infected cities plus every city directly joined to one by a single road. | Easy2 | GraphImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Minions' MasterFor each town, compute the average power and the percentage of residents above it, rounded to three decimals. | Easy2 | ImplementationMath | No attempts yet | 3s | 256 MB | Judgeable |
| Hangul 2Given one Hangul syllable, compute its one-based index in the ordered list of 11172 syllables. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Initial, Medial, FinalDecompose one Hangul syllable into its initial, medial, and optional final jamo and print each on its own line. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Compose a Hangul SyllableJoin the given choseong, jungseong, and optional jongseong into a single Hangul syllable and print it. | Easy2 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Margaret's Minute Minute ManipulationDecode two binary-clock matrices into times, add them modulo 24 hours, and print the sum in the same matrix format. | Easy2 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| PasswordCheck whether the two letters typed into the blanked positions of a stored answer match the letters at those positions, ignoring spaces. | Easy2 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Creature Number SystemsConvert each given decimal number up to 5000 into the creature's base between 2 and 20, using letters A to J for digits above 9. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| PriceApply the sticker discount and then the optional coupon to each price, round to cents, and apply the extra cash rounding for cash payments. | Easy2 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| GraphsPrint the equation line and an 11-column asterisk grid showing the y axis, the x axis, and the line y = Ax + B for each test case. | Easy2 | ImplementationSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Time Limit CheckFor each case, evaluate f(N) times T from the named complexity and print TLE when it exceeds 10^8 times L. | Easy2 | MathImplementation | No attempts yet | 2s | 256 MB | Judgeable |
| Eakspay igpay atinlay?Translate each phrase into Pig Latin by moving each leading consonant cluster to the end with ay, or adding yay after vowel-initial words. | Easy2 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Crushing ConfectionsFind the lexicographically smallest row or column triple of equal candies in each grid and print its positions. | Easy2 | MatrixImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Orc PopulationGiven two consecutive yearly populations and c, print the population c years later where each year equals the sum of the two before it. | Easy2 | ImplementationSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Your weapon is kind of badEach fighter swaps to the other weapon bonus stats, recomputes combat power from the given formula, and reports whether it rises, falls, or stays the same. | Easy2 | Implementation | No attempts yet | 1s | 512 MB | Judgeable |
| DistributionYou split the integers from 0 to 2^N - 1 into 2^K boxes of equal size with equal total popcount by pairing each x with its bitwise complement. | Easy2 | Bit manipulationMath+1 | No attempts yet | 1s | 512 MB | Judgeable |
| Mr. Gorbachev, Tear Down This Wall!Add up the lengths of the axis-aligned wall segments and report the total work hours split across the workers, rounded up. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| AmpelmännchenFor each item pick the West or East version that gives the larger population-weighted happiness total. | Easy2 | GreedyImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Black and White PanelPrint the fixed 101-column black and white grid whose isolated single tiles yield exactly b black areas and w white areas. | Easy2 | ImplementationMatrix | No attempts yet | 2s | 256 MB | Judgeable |
| Hash Code HackerThe program prints k distinct letter strings that share one Java hash code by mapping binary digits to Aa and BB blocks. | Easy2 | StringImplementation | No attempts yet | 2s | 256 MB | Judgeable |
| Lucky ChancesCount over every grid cell how many of the four directions contain only smaller numbers or reach the edge. | Easy2 | Brute forceMatrix+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Base ConversionConvert the given number written in base A into base B and print its digits separated by spaces. | Easy2 | MathImplementation | No attempts yet | 2s | 256 MB | Judgeable |
| Egg Drop LogFrom the logged safe and broken drops, compute the lowest floor that could break and the highest floor that could stay safe. | Easy2 | IntervalsImplementation | No attempts yet | 2s | 256 MB | Judgeable |
| Stand on ZanzibarThe program adds yearly increases beyond twice the previous count to bound the number of imported turtles. | Easy2 | MathImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Scaling RecipesScale each recipe from the main ingredient weight and baker percentages, then print every scaled weight rounded half up to one decimal. | Easy2 | ImplementationMath | No attempts yet | 3s | 256 MB | Judgeable |
| Lost ExponentsSplit each integer into a base from all but the last digit and an exponent from the last digit, then print the sum of the powers. | Easy2 | MathImplementation | No attempts yet | 1s | 64 MB | Judgeable |
| Tiling recordGiven a floor tiled with 1 by n tiles labeled by number, list each tile as h or v in row-major order of its first cell. | Easy2 | SimulationMatrix+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Hex Code DecoderDecode each line of hexadecimal digit pairs into its printable ASCII message. | Easy2 | Implementation | No attempts yet | 1s | 256 MB | Judgeable |
| Octal, Decimal, HexadecimalConvert one integer given in octal, decimal, or hexadecimal notation to its decimal value. | Easy2 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Bear in the TrapFind the smallest and largest integers between L and D whose digits sum to X. | Easy2 | Brute forceImplementation | No attempts yet | 1s | 64 MB | Judgeable |
| FloodFollow the given greedy procedure to build a permutation histogram with trapped-water capacity X, or print -1 when it fails. | Easy2 | GreedyImplementation | No attempts yet | 1s | 64 MB | Judgeable |
| Belote PointsSum the scores of all 4N cards using the value table where J and 9 score more in the dominant suit. | Easy2 | Implementation | No attempts yet | 1s | 64 MB | Judgeable |
| Number tag exchangeSimulate M bubble passes over the line, swapping neighbors when the front tag has the larger remainder modulo the pass number. | Easy2 | SimulationImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| gMatrix (Small)Build the matrix from the given formula and add the largest entry of every K by K consecutive submatrix. | Easy2 | Brute forceMatrix+1 | No attempts yet | 5s | 512 MB | Judgeable |
| Hangul Initial ConsonantsPrint the initial consonant of each Hangul syllable in the given string in order. | Easy2 | MathString+1 | No attempts yet | 1s | 512 MB | Judgeable |
| #include <Google I/O.h>Decode each block of eight I and O letters as one ASCII byte and print the message for every test case. | Easy2 | ImplementationString+1 | No attempts yet | 5s | 512 MB | Judgeable |