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
AdditionRead two integers between -100,000 and 100,000 and print their sum.Easy1MathImplementationNo attempts yet1s512 MBJudgeable
CAPSRead a lowercase string and print every character converted to uppercase.Easy1StringImplementationNo attempts yet2s512 MBJudgeable
Judging MooseGiven the tine counts on each side, print the moose's score as Even x, Odd x, or Not a moose when both sides are zero.Easy1ImplementationMathNo attempts yet1s512 MBJudgeable
Hard choiceGiven prepared and requested counts for chicken, beef, and pasta, count passengers whose requested meal is unavailable.Easy1MathImplementationNo attempts yet1s1024 MBJudgeable
Every Second CountsGiven a start and end clock time, compute how many seconds elapsed, adding 24 hours if the ride crosses midnight.Easy1MathImplementationNo attempts yet2s512 MBJudgeable
AnglesFor each triple of angles, print the numbers and say whether they sum to 180.Easy1ImplementationMathNo attempts yet2s512 MBJudgeable
RectanglesRead R and C, then print R lines of C asterisks each to draw a rectangle.Easy1ImplementationNo attempts yet2s512 MBJudgeable
Final ScoreGiven the rosters of two teams and the names of the goal scorers, count each team's goals and decide which team scored more.Easy1Hash mapImplementation+1No attempts yet2s512 MBJudgeable
Chanukah CandlesEach evening needs one more candle than the last plus one shammas, so for N days compute N(N+1)/2 + N.Easy1MathImplementationNo attempts yet2s512 MBJudgeable
Sim CardFor each student, compute the smallest total cost of call minutes and data across the three fixed operator price plans.Easy1ImplementationBrute force+1No attempts yet2s512 MBJudgeable
Vera's FashionGiven N tops and N bottoms colored 1 to N, count how many top and bottom pairs have different colors.Easy1MathCombinatorics+1No attempts yet2s256 MBJudgeable
Fast A+BRead T pairs of integers from fast input and print each sum on its own line.Easy1ImplementationMath+1No attempts yet1s512 MBJudgeable
Sum of N integersRead N integers and print their sum, which needs a 64-bit integer type.Easy1ImplementationMathNo attempts yet0.1s512 MBJudgeable
Linear Algebra and GroupOutput the sum of the digits appearing in the cover illustration of a specific linear algebra textbook.Easy1ImplementationMath+2No attempts yet1s256 MBJudgeable
SUPER SUPER BINARY SEARCH DELUXE 2.5: THE LEGEND OF THE GOLDEN MAZASSUMNIDA, EPISODE 2: THE MAZWAETL UNIVERSE, PART 2: THE PARALLEL UNIVERSE AND THE LOST MAZASSUMNIDA: GAME OF THE YEAR EDITIONPrint the first midpoint binary search picks on [1, 100], which is 50.Easy1Binary searchImplementationNo attempts yet1s256 MBJudgeable
YeeRead any amount of input, including none, and print the single word Yee.Easy1ImplementationBrute forceNo attempts yet2s512 MBJudgeable
Yonsei UniversityRead N (0 or 1) and print either YONSEI or Leading the Way to the Future depending on its value.Easy1ImplementationNo attempts yet1s128 MBJudgeable
RectangleImplement a Rectangle class with width and height, range-checked setters, and methods for area, perimeter, and square detection.Easy1ImplementationMath+2No attempts yet1s512 MBJudgeable
The group project starts and the team leader is goneGiven a distance L, Sungwoo covers 1 to 5 per minute; print the smallest integer number of minutes needed to reach Mingeon.Easy1MathImplementation+1No attempts yet1s128 MBJudgeable
Who Am IPrint the exact line I'm Sexy.Easy1ImplementationNo attempts yet1s128 MBJudgeable
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.Easy1ArrayImplementation+2No attempts yet1s512 MBJudgeable
What Is Your Name Score?Given an uppercase name, sum the alphabetical position of each letter and print the total.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Winning ICPCCount how many problems each team fully solved (S = T), then report the team with the most solves, breaking ties by smallest index.Easy1ArrayImplementationNo attempts yet2s512 MBJudgeable
Simple ArithmeticRead three integers a, b, c and print a times b divided by c within an absolute error of 1e-6.Easy1MathImplementationNo attempts yet1s1024 MBJudgeable
A New BeginningPrint the fixed string "파이팅!!" with no input, a simple output-only warmup task.Easy1ImplementationNo attempts yet2s256 MBJudgeable
CASIORead two integers N and M and print 1 if they are equal, otherwise 0.Easy1ImplementationMathNo attempts yet2s256 MBJudgeable
Weird SymbolGiven two integers A and B, compute (A+B)*(A-B) and print the result.Easy1MathImplementationNo attempts yet2s256 MBJudgeable
General ElectionSum each candidate's votes across regions and print the candidate number with the largest total.Easy1ArrayImplementationNo attempts yet2s512 MBJudgeable
Passionate SortingRead N numbers and print them in ascending order separated by spaces.Easy1SortingImplementationNo attempts yet1s512 MBJudgeable
Hongik UniversityRead a year N and print how many years have passed since 1946, so output N minus 1946.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Jerry and TomSubtract the fraction A/B from 1 and print the remaining cheese as P/Q in lowest terms.Easy1MathNumber theory+1No attempts yet1s128 MBJudgeable
Missing RunnerGiven the numbers 1 to N with exactly one omitted from a list of N - 1 distinct values, report the missing number.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Happy Birthday, kipa00!The problem asks contestants to output a UTF-8 birthday letter for kipa00, scored by hidden criteria unrelated to algorithmic problem solving.Easy1ImplementationNo attempts yet1s512 MBJudgeable
Serious ProblemCount how many times 2 and e appear in a string of those two characters and report which is more frequent, or yee if tied.Easy1StringImplementationNo attempts yet1s256 MBJudgeable
BingoPrint the fixed 5x5 bingo board showing which cells are colored, with # for colored and . for empty.Easy1ImplementationSimulationNo attempts yet0.999s511 MBJudgeable
Is it rated?Given the name of a past Codeforces contest, print 1 if the contest was rated and 0 otherwise.Easy1ImplementationStringNo attempts yet1s512 MBJudgeable
EmojiGiven a short message, determine for each line whether it contains the Slack cat emoji expressed as an ASCII shortcode.Easy1StringImplementation+1No attempts yet1s512 MBJudgeable
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.Easy1MathImplementation+2No attempts yet1s256 MBJudgeable
Sort Master Bae JihoonGiven N integers, print the largest value, which is the last element after sorting in ascending order.Easy1ArrayImplementationNo attempts yet1s256 MBJudgeable
Endgame SpoilerThe input is the plot of Avengers: Endgame, and the required output is the film's English title.Easy1ImplementationNo attempts yet1s512 MBJudgeable
Greetings!Given a greeting of the form h followed by e's and a y, print the same greeting but with twice as many e's.Easy1StringImplementationNo attempts yet1s512 MBJudgeable
Animal King ElectionRead nine votes, each either Tiger or Lion, and print the candidate who received more than half of them.Easy1ImplementationStringNo attempts yet1s512 MBJudgeable
Telephone Directory Information RoutingGiven a 7-digit phone number, print YES if its first three digits are 555, otherwise NO.Easy1ImplementationMathNo attempts yet1s512 MBJudgeable
Counting ClausesGiven a 3-SAT instance with m clauses and n variables, print satisfactory if it has at least eight clauses and unsatisfactory otherwise.Easy1ImplementationNo attempts yet1s512 MBJudgeable
Born in 1998, but 2541 in Thailand?!Given a Buddhist calendar year between 1000 and 3000, print the corresponding Gregorian year by subtracting 543.Easy1MathImplementation+2No attempts yet1s1024 MBJudgeable
What an Easy ProblemImplement a function that returns the move losing to Kyojun each round, given the move he announces before playing.Easy1ImplementationSimulationNo attempts yet1s512 MBJudgeable
Find the VerticesAn interactive-style task where a hidden edge between two vertices must be identified by querying the grader; input is fixed by the grader, not read.Easy1GraphImplementationNo attempts yet2s512 MBJudgeable
RatsGiven three counts from a mark-recapture study, compute the Chapman estimator using the stated floor formula and print it.Easy1MathImplementation+1No attempts yet1s512 MBJudgeable
Extreme TemperaturesRead lines that pair a date with integer temperatures and print the smallest and largest values across every measurement.Easy1ImplementationArray+2No attempts yet2s512 MBJudgeable
PetrolGiven the petrol n used next month and the leftover quota k, compute the cost where the first 60+k liters cost 1500 each and the rest cost 3000 each.Easy1MathImplementationNo attempts yet2s512 MBJudgeable
HOMWRKRead pairs of integers and print each pair's sum followed by its product on one line.Easy1MathImplementationNo attempts yet2s512 MBJudgeable
Three IntegersGiven three integers, each either 1 or 2, print whichever value appears more often.Easy1ImplementationNo attempts yet2s512 MBJudgeable
Counting VowelsCount how many characters in a lowercase string are one of the vowels a, i, u, e, o.Easy1StringImplementationNo attempts yet2s512 MBJudgeable
ExamRead three scores and print the sum of the two largest.Easy1ArrayImplementation+1No attempts yet2s512 MBJudgeable
Inversion of a StringReverse the substring of S from position A to position B, keep the rest unchanged, and print the resulting string.Easy1StringImplementationNo attempts yet2s512 MBJudgeable
ModeCount how many times each value from 1 to M appears in the sequence and print the largest count.Easy1ImplementationArrayNo attempts yet2s512 MBJudgeable
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.Easy1StringImplementation+1No attempts yet2s512 MBJudgeable
Beginning the HuntA joke problem with no input that asks for a fixed uppercase answer with no spaces.Easy1ImplementationNo attempts yet1s512 MBJudgeable
A+B (MC)Build a Minecraft redstone circuit that reads two integers from a command interpreter and outputs their sum.Easy1SimulationImplementation+1No attempts yet1s512 MBJudgeable
You can submit after 0 seconds.Given the time of the most recent submission and a delay k, submit at or before T + k seconds; there is no input and any output works.Easy1ImplementationNo attempts yet1.001s512 MBJudgeable
Print N MPrint the integers from 1 to N*M as N lines of M space-separated numbers each.Easy1ImplementationNo attempts yet1s512 MBJudgeable
Dog TreatsRead the counts of small, medium, and large treats, compute 1*S + 2*M + 3*L, and print happy if the score is at least 10, otherwise sad.Easy1MathImplementationNo attempts yet2s512 MBJudgeable
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.Easy1MathProbability+2No attempts yet1s256 MBJudgeable
Barn LotteryGiven N cows and a W by H barn, find how many L by L square spaces fit inside the barn, capped at N.Easy1MathImplementation+2No attempts yet1s1024 MBJudgeable
Command PromptGiven N equal-length file names, output a pattern where each position is the common character if all names agree there, or a question mark otherwise.Easy2StringImplementationNo attempts yet2s128 MBJudgeable
Hansu NumbersCount integers from 1 to N (N up to 1000) whose digits form an arithmetic sequence.Easy2ImplementationBrute force+1No attempts yet2s128 MBJudgeable
Make It DivisibleFind the smallest two-digit replacement (00-99) for the last two digits of N that makes N divisible by F.Easy2Brute forceMath+1No attempts yet2s128 MBJudgeable
White SquaresGiven an 8x8 board marked with pieces and empty cells, count how many pieces sit on the white squares of the standard alternating coloring.Easy2ArrayImplementation+1No attempts yet2s128 MBJudgeable
Word CountCount the number of space-separated words in a string that may have leading or trailing spaces.Easy2StringImplementationNo attempts yet2s128 MBJudgeable
Most Frequent LetterCount letter frequencies in a string, case-insensitively, and print the most common letter in uppercase or a question mark on ties.Easy2Hash mapString+1No attempts yet2s128 MBJudgeable
Basketball GameGiven N surnames, count first letters and print all letters (in order) that start at least five surnames, or PREDAJA if none does.Easy2Hash mapImplementation+1No attempts yet1s128 MBJudgeable
Octal to BinaryConvert a huge octal number (up to 333,334 digits) into its binary representation without leading zeros.Easy2StringImplementation+1No attempts yet1s256 MBJudgeable
Sign of Integer SumsFor three separate lists of integers, compute each sum and print whether it is positive, negative, or zero, handling values up to 64-bit signed range.Easy2ImplementationMathNo attempts yet2s256 MBJudgeable
Splitting a WordSplit a lowercase word into three nonempty parts, reverse each part, and find the lexicographically smallest concatenation among all splits.Easy2StringBrute force+1No attempts yet2s128 MBJudgeable
Mobile Phone BillGiven up to 20 call durations, compute total cost under two per-block billing plans and print the cheaper one with its cost.Easy2SimulationImplementation+1No attempts yet2s128 MBJudgeable
House Number SignCompute the total width of a house-number sign given fixed per-digit widths and 1 cm margins between digits and at both ends, for each input number until 0 appears.Easy2ImplementationString+1No attempts yet1s128 MBJudgeable
Easy Sequence SumGiven a sequence where each integer k repeats k times, compute the sum of terms between positions A and B.Easy2MathSimulation+1No attempts yet2s128 MBJudgeable
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.Easy2StringImplementation+1No attempts yet2s128 MBJudgeable
TV SizeGiven a TV's diagonal length and height-to-width ratio, compute the actual height and width, flooring non-integer results.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Group Word CheckerCount how many of up to 100 lowercase words have every repeated character forming a single contiguous block.Easy2StringImplementationNo attempts yet2s128 MBJudgeable
Year Progress BarGiven a date and time string, compute what percentage of the current year (accounting for leap years) has elapsed.Easy2ImplementationMathNo attempts yet2s128 MBJudgeable
Actual Disk SpaceGiven N file sizes and a cluster size, compute total disk space used by rounding each file up to the nearest cluster multiple and summing.Easy2MathImplementation+1No attempts yet2s128 MBJudgeable
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.Easy2StringBrute force+1No attempts yet2s128 MBJudgeable
Reversed AdditionReverse the digits of two numbers up to 1000, add the reversed values, then reverse the sum and print the result.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
PetSimulate feeding and exercising a pet's weight across scenarios and report whether it ends happy, sad, or dead based on simple weight thresholds.Easy2SimulationImplementationNo attempts yet1s128 MBJudgeable
Most Frequent LettersCount lowercase letter frequencies across up to 50 lines of text and print all letters tied for the highest frequency in alphabetical order.Easy2Hash mapString+1No attempts yet2s128 MBJudgeable
EarringsGiven girl names and 2n-1 confiscation/return records tagged with a number and a letter, find the girl whose number appears only once and thus never got her earring back.Easy2Hash mapArray+1No attempts yet1s128 MBJudgeable
Floor DecorationCount the number of wooden planks by counting maximal runs of consecutive '-' in each row and '|' in each column of a grid.Easy2MatrixImplementation+1No attempts yet2s128 MBJudgeable
24-Hour MissionGiven the current time and a start time in HH:MM:SS, compute the time remaining until the start time next occurs within a 24-hour cycle.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Sort Digits DescendingRearrange the digits of a given natural number so they appear in descending order and print the result.Easy2SortingString+1No attempts yet2s128 MBJudgeable
Organizing BooksSimulate packing books into boxes in order, sealing a box once the next book no longer fits, and sum the leftover capacity of every box.Easy2SimulationImplementation+1No attempts yet2s128 MBJudgeable
Time MachineGiven three two-digit numbers from a digital clock, count how many of the 6 permutations form a valid HH:MM:SS time.Easy2CombinatoricsBrute force+1No attempts yet2s128 MBJudgeable
Internet Cafe Seat RequestsGiven a sequence of seat requests for 100 computers, count how many requests are rejected because the requested seat is already taken.Easy2SimulationArray+1No attempts yet2s128 MBJudgeable
Room NumberGiven a room number, count how many plastic digit sets (0-9 each) are needed, treating 6 and 9 as interchangeable when flipped.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Adjusted AverageGiven N exam scores, rescale each by dividing by the maximum score and multiplying by 100, then output the average of the rescaled scores.Easy2ArrayMath+1No attempts yet2s128 MBJudgeable
BallTrack which of three cups covers a ball as cups swap positions M times, then output the cup number holding it.Easy2SimulationImplementationNo attempts yet2s128 MBJudgeable
Sequence TransformationRepeatedly replace a sequence with its adjacent differences K times and print the resulting shorter sequence.Easy2ArraySimulation+1No attempts yet2s128 MBJudgeable
Manhattan Distance on a Four-Row Number BoardGiven two numbers placed column by column in a 4-row grid, compute the Manhattan distance between their cell positions.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Trophy DisplayCount how many trophies form a visible prefix-maximum sequence when scanning the row from the left and separately from the right.Easy2ArrayImplementationNo attempts yet2s128 MBJudgeable
Break-Even PointGiven fixed cost A, variable cost B, and price C, find the smallest number of laptops where revenue exceeds total cost, or -1 if impossible.Easy2MathImplementationNo attempts yet0.35s128 MBJudgeable