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,365 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
The New CCC (Canadian Calorie Counting)Read four menu choices, look up each item's calorie count, and print the total in a fixed sentence.Easy1ImplementationArrayNo attempts yet1s128 MBJudgeable
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.Easy1MathImplementation+1No attempts yet1s128 MBJudgeable
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.Easy1GraphImplementation+1No attempts yet1s128 MBJudgeable
RegistrationPrint a fixed registration record: the number 123 on the first line and the string Your_ICPC_Team_Name on the second line.Easy1ImplementationNo attempts yet1s128 MBJudgeable
TrianglesFor each size n read from input until 0, print a right triangle of stars with n rows, row i having i stars.Easy1ImplementationSimulationNo attempts yet1s128 MBJudgeable
Library CodesFor each book, print horizontal if f times label length plus 2 is at most the book width, otherwise print vertical.Easy1ImplementationNo attempts yet1s128 MBJudgeable
The Universal OracleGiven one line of text, replace each question's leading 'What' with 'Forty-two' and its final '?' with '.', ignoring non-questions.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
AlienGiven a point and n axis-aligned rectangles, decide whether any rectangle contains the point, boundaries included.Easy1GeometryImplementation+2No attempts yet2s128 MBJudgeable
Can You Add This?Read t pairs of integers and print the sum of each pair on its own line.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
PlaneGiven row and seat counts for business and economy classes, compute the total number of seats on the plane.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
DyslexiaCompare two equal-length letter strings position by position and count the positions where the characters differ, treating case as significant.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
DyslexiaCompare two equal-length strings character by character and count positions where the letters match exactly, including case.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
SumGiven an integer n, compute and print the sum of all integers from 1 to n.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Reverse a Three-Letter WordRead a three-letter word and print its characters in reverse order.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
FactorialRead n and print the ones digit of n factorial.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Sign of OperationChoose the operator among +, -, and * that gives the largest value for a and b, and print the expression or NIE on a tie.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Caesar CipherGiven the encrypted message and its original first letter, recover the shift and decode the full message.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
HeptathlonThe program converts seven event records into scores with the given formulas and prints the total for each test case.Easy1ImplementationMathNo attempts yet1s128 MBJudgeable
OX QuizScore each O by the length of its unbroken run of O characters and print the total for each test case.Easy1ImplementationStringNo attempts yet1s128 MBJudgeable
Pennant RacePrint the team with the highest winning percentage, computed as wins divided by wins plus losses plus ties.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Plot of LandGiven N bead positions, compute the area of the smallest axis-aligned rectangle that contains them all.Easy1GeometryImplementationNo attempts yet1s128 MBJudgeable
A Famous Line That Makes No SensePrint the fixed Korean line exactly with no input and no extra spaces.Easy1ImplementationNo attempts yet1s512 MBJudgeable
Score TallyDrop the highest and lowest of five judge scores, print KIN when the remaining three span 4 or more, else print their sum.Easy1SortingImplementationNo attempts yet1s128 MBJudgeable
AdditionAdd up N small natural numbers for each test case and print each sum on its own line.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Reverse Each WordFor each of T sentences, print the words in the same order with the letters inside every word reversed.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
GradabaseAdd one to every grade and print only students remaining in grades 1 to 6 for each case.Easy1ImplementationArrayNo attempts yet3s128 MBJudgeable
JengaCheck each three-block row for two adjacent missing blocks and report whether each tower stands.Easy1ImplementationStringNo attempts yet1s128 MBJudgeable
DiceAdd the two dice values in each test case and print the sum with its case number.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Ant EntrapmentTrack the minimum and maximum X and Y over the ants and report the area and perimeter of that bounding rectangle.Easy1ImplementationMathNo attempts yet3s256 MBJudgeable
Math TutoringRead each polynomial's degree and coefficients and print the coefficients of its derivative in the same format.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Practice: Roll CallRewrite each first and last name pair as one line in Last, First order with a case number.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Hello JudgePrint Hello World, Judge i! for line numbers 1 to N given N.Easy1ImplementationNo attempts yet1s128 MBJudgeable
How much?Add the base car price to each option's quantity times unit price for every test case.Easy1ImplementationMathNo attempts yet1s128 MBJudgeable
Find the missing pagesGiven a booklet of N pages and a page P, print the other three pages on the same folded sheet in ascending order.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Exam GradeRead an integer score from 0 to 100 and print the grade A, B, C, D, or F for its range.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Kkung's Space TripCount the ships that reach the destination by checking whether each ship's fuel covers its burn rate over the travel time.Easy1MathImplementationNo attempts yet2s128 MBJudgeable
Beautiful YekaterinburgGiven position D from 1 to 4, print the D-th digit of the year Yekaterinburg was founded.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Arabic and EnglishSwap the words before and after the single English word in each mixed line and print lines with no English word unchanged.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Fraud BustersMatch each 9-character database code against the scanned code, treating every star as a wildcard, and print the matches in input order.Easy1String matchingImplementationNo attempts yet1s128 MBJudgeable
Quadrants and axesCount how many of n points fall in each of the four quadrants and how many lie on an axis.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Cabin BaggageDecide for each bag whether it meets the size and weight limits, print 1 or 0 per bag, then print the total count.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Crossword puzzle decorationSurround the M by N letter grid with the given padding and fill the added cells with alternating # and . by row plus column parity.Easy1ImplementationMatrixNo attempts yet1s128 MBJudgeable
Balloon ColorsCheck whether the first color differs from X and the last color differs from Y, then print BOTH, EASY, HARD, or OKAY.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Star Wars logoPrint the fixed 11-line Star Wars ASCII logo exactly, keeping all leading spaces.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Naboo Fleet DataPrint the fixed Naboo fleet table with four left-aligned columns of the given widths.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Sahur and Imsa'Given T timestamps, print the time 45 minutes earlier for each, wrapping past midnight.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
QuadrantsRead points until 0 0 and print Q1 to Q4 from the signs of x and y, or AXIS on an axis.Easy1ImplementationNo attempts yet1s128 MBJudgeable
ID KeyAdd the digit sum of each 13-digit ID to ten times its last three digits, then keep four digits as the key.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Max VolumeCompute the volume of each cone, cylinder, and sphere with pi as 3.14159 and print the largest value rounded to three decimals.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Birthday StatisticsCount how many of the n employees were born in each month and print the twelve monthly totals.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
MedianFor each group, print the middle value in input order, or the average of the two middle values when the count is even.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Encoding Binary NumbersEncode each binary string as run lengths followed by digits and print the result per line.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
GiftCount the days on which the recorded time is at least k milliseconds faster than the previous day.Easy1ArrayImplementationNo attempts yet2s512 MBJudgeable
NICE check letterRead seven digits, compute the weighted sum modulo 11, and print the mapped check letter.Easy1ImplementationMathNo attempts yet2s1024 MBJudgeable
Coin tossingCount each game's correct calls for the first player and misses for the second player, then print both names with their scores.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Hide those lettersThe program replaces every occurrence of two given letters in both cases with underscores.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Filling in the missing rectangle valueEach line gives a rectangle's length, width and area with one value replaced by 0, and you compute and print the missing value.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Pokémon MasterGiven a Pokedex number up to 718, print the matching Pokemon name and its types in order.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Most Frequent Smallest NumberPrint how many integers lie strictly between the two given integers, then list them in ascending order.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Classifying TrianglesRead three angles and print Equilateral, Isosceles, Scalene, or Error from their sum and equal angles.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Vote CountCount the votes for A and B and print the winner, or Tie when the counts are equal.Easy1ImplementationNo attempts yet1s256 MBJudgeable
NFC West and North StandingsPrint the fixed NFC West and NFC North standings exactly as specified with no input.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Print a CatPrint the exact ASCII art of a cat with no input.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Print a DogPrint the given ASCII art dog figure exactly with no input.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Dominant SpeciesFor each area, tally the weighted predator sightings and print the unique top scorer or report no dominant species.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Ship SelectionCount the ships whose fuel covers consumption times the integer-division travel time for the given distance.Easy1ImplementationMathNo attempts yet1s256 MBJudgeable
Acid and BaseCompute the pH from each given H+ or OH- concentration with the log formulas and print it rounded to two decimals.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Golden Ratio TestGiven T pairs of numbers, print golden for each pair whose ratio a/b is within 1 percent of the golden ratio.Easy1ImplementationMathNo attempts yet1s256 MBJudgeable
QuadrilateralPrint a solid rectangle of X letters for each given width and height, separating consecutive outputs with a blank line.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Print HookPrint the word Hook as fixed ASCII art with no input.Easy1ImplementationNo attempts yet1s256 MBJudgeable
AcronymsGiven an acronym and candidate phrases, print the phrases whose word initials match the acronym letters in order.Easy1StringImplementationNo attempts yet1s256 MBJudgeable
MysteryPrint Yonsei on one line with no input.Easy1ImplementationNo attempts yet1s256 MBJudgeable
BaseballSum both teams runs over nine innings for each test case and print the higher scorer or Draw.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Meat on the GrillPrint each input row reversed to mirror the whole hotplate left to right.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Automated Checking MachineCheck two five-point connectors and print Y only when each position pairs a plug with an outlet.Easy1ImplementationNo attempts yet3s256 MBJudgeable
Do you like fractions?Convert each fraction to a mixed number by printing the quotient, the remainder, and the original denominator without reducing.Easy1ImplementationMathNo attempts yet2s256 MBJudgeable
OdditiesGiven up to 20 integers, print whether each one is odd or even.Easy1ImplementationNo attempts yet2s256 MBJudgeable
Ragged RightGiven the lines of a paragraph, find the longest line length and print the sum of squared differences for every line except the last.Easy1ImplementationNo attempts yet2s256 MBJudgeable
Keystrokes per FingerCount how many times each of the eight fingers presses a key when the given string is typed on the fixed US layout.Easy1ImplementationArrayNo attempts yet1s32 MBJudgeable
Magic ChessboardFlip each even row and then each even column exactly as specified to turn the n by m chessboard into a single color.Easy1ImplementationNo attempts yet1s256 MBJudgeable
DaliaDecide for each test case whether a knight moves from the start square to the target square in exactly one legal move.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Omar's addition and subtraction checkCheck up to 100 equations of the form X + Y = Z or X - Y = Z and print YES or NO for each case.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Water BillCompute the bills of companies X and Y from the given usage and output the cheaper one.Easy1ImplementationMathNo attempts yet1s256 MBJudgeable
Christmas PartyTally each friend's score over M guessing games from the targets and the written names.Easy1ImplementationNo attempts yet1s256 MBJudgeable
We love kriiiPrint the fixed Korean phrase 강한친구 대한육군 on two lines with no input.Easy1ImplementationNo attempts yet1s256 MBJudgeable
A Special DayCompare the given month and day against February 18 and print Before, After, or Special.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Traffic Day BanCount how many of the five given car number digits match the date digit.Easy1ImplementationArrayNo attempts yet1s256 MBJudgeable
String analysisCount the lowercase letters, uppercase letters, digits, and spaces in each input line until end of input.Easy1StringImplementationNo attempts yet1s256 MBJudgeable
Comma Sum MultilineJoin the input lines into one comma-separated string, split it at commas, and print the sum of the numbers.Easy1ImplementationStringNo attempts yet1s256 MBJudgeable
A Day for CodingA poem about coding and algorithms with no computational task; there is no input, output, or problem to solve.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Rock paper scissorsRead the past rounds and print 0 when there are none, 2 when the opponent last threw rock, and 0 otherwise.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Friend countsCount the friends of each of N students from M mutual friendship pairs and print the N totals in order.Easy1GraphImplementationNo attempts yet1s256 MBJudgeable
Basic arithmeticPrint the sum, difference, product, quotient, and remainder of two given natural numbers.Easy1ImplementationNo attempts yet1s256 MBJudgeable
FactorialPrint the factorial of a given integer N, where N is between 0 and 12.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Professor Lee's ExamPrint the numbers of students whose ten answers exactly match 1, 2, 3, 4, 5, 1, 2, 3, 4, 5 in order.Easy1ImplementationArrayNo attempts yet1s256 MBJudgeable
0 = not cute / 1 = cuteCount the 0 and 1 votes and print whether Junhee is cute based on the majority.Easy1ImplementationArrayNo attempts yet1s2 MBJudgeable
Penalty calculationFind the earliest submission with the highest score and compute the penalty from its time and attempt count.Easy1ImplementationNo attempts yet1s256 MBJudgeable
N-orthotopeGiven two axis-aligned boxes in N dimensions, print the dimension of their overlap, or -1 when they do not meet.Easy1ImplementationGeometryNo attempts yet1s256 MBJudgeable
SHA-224Print the 56-digit lowercase hexadecimal SHA-224 hash of the given alphanumeric string.Easy1ImplementationNo attempts yet1s256 MBJudgeable
SHA-384Read an alphanumeric string and print its SHA-384 hash as 96 lowercase hex digits.Easy1ImplementationNo attempts yet1s256 MBJudgeable