Curated sets

First steps

Loops, arithmetic, and input and output. Start here.

All problems
Total results1,239 problems
TopicsJudge
In the ShowerCount, for each test case, how many of the N bottles need more than E attempts and are empty.Easy1ArrayNo attempts yet1s256 MBJudgeable
IT Passport Examination GradingAdd each applicant's three field scores and mark PASS only when the total reaches 55 and every field meets its 30 percent cutoff.Easy1ImplementationNo attempts yet2s256 MBJudgeable
Thai Lottery Prize CheckGiven the winning numbers and prize amounts for six Thai lottery categories, compute the total prize for each ticket by adding every matched category.Easy1StringImplementationNo attempts yet2s256 MBJudgeable
Logical Functions: AND and ORCheck each submitted weight and bias by testing all four binary inputs and report whether the neuron matches the requested AND or OR gate.Easy1SimulationImplementationNo attempts yet2s256 MBJudgeable
Cryptographer's ConundrumCount the positions where the given string differs from PER repeated to the same length.Easy1StringImplementationNo attempts yet1s256 MBJudgeable
Hangul SyllablesGiven N between 1 and 11172, print the N-th Hangul syllable in initial, medial, then final order.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
The Tallest StudentPrint the name of the tallest student in each test case, listing every tied name in input order.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Pedometer DistanceMultiply each step count by the stride length and print each distance in kilometres with five decimals.Easy1ImplementationMathNo attempts yet1s256 MBJudgeable
Count Me InCount the vowels and consonants in each of up to 100 given English sentences.Easy1StringImplementationNo attempts yet1s256 MBJudgeable
Covering an equilateral triangleCover an equilateral triangle of side A with the smallest possible number of side-B equilateral triangles, which is (A/B) squared.Easy1MathNo attempts yet1s256 MBJudgeable
Polynomial BoundariesGiven polynomial coefficients and a point (x, y), evaluate the polynomial at x and report whether y lies below, on, or above its value.Easy1MathNo attempts yet2s256 MBJudgeable
!terces poTReverse every input line except the final END line and print each decoded sentence in order.Easy1StringNo attempts yet1s256 MBJudgeable
Report Card TimeConvert each hobbit's numeric score to a letter grade using the given scale and print the results in input order.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Little JeongminAdd three given integers up to 10^12 and print their sum.Easy1MathNo attempts yet1s512 MBJudgeable
The Image Stretched Twice as WideCheck whether doubling every character of the first picture sideways produces the second picture.Easy1ImplementationStringNo attempts yet1s512 MBJudgeable
Concatenate two linesRead two input lines and print their concatenation with nothing inserted between them.Easy1StringNo attempts yet1s256 MBJudgeable
And Then There Was 5For each query offset into pi and target digit, you print the next matching digit and the 5 after it.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Three Kinds of SumsFor each data set with N, print the sums of the first N positive integers, the first N odd integers, and the first N even integers.Easy1MathNo attempts yet1s256 MBJudgeable
Lining Up by NameCheck whether the given player names stand in increasing or decreasing dictionary order and print INCREASING, DECREASING, or NEITHER.Easy1StringArrayNo attempts yet1s256 MBJudgeable
Identifying teaCount how many of the five contestants guessed the given tea type correctly.Easy1ImplementationNo attempts yet3s256 MBJudgeable
Yangjojang of The YearFor each test case, print the name of the school with the largest alcohol amount.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Affine CipherApply E(X) = (aX + b) mod 26 to each uppercase letter of the plaintext and print the ciphertext.Easy1ImplementationString+1No attempts yet5s256 MBJudgeable
The Princess and the Magic MirrorPrint an N by N picture unchanged, mirrored left to right, or flipped top to bottom according to the given mood number.Easy1MatrixImplementationNo attempts yet2s256 MBJudgeable
Popularity VoteFor each poll, find the candidate with the most votes and report whether the top count is a majority, a minority, or tied.Easy1ImplementationArrayNo attempts yet2s256 MBJudgeable
PersistenceCount how many times multiplying the decimal digits together reduces the given number to a single digit.Easy1SimulationImplementationNo attempts yet1s256 MBJudgeable
ASCII CodePrint the ASCII code of the given letter or digit.Easy1ImplementationNo attempts yet1s256 MBJudgeable
ROT13Encrypt the given string with ROT13, shifting each English letter by 13 places and leaving other characters unchanged.Easy1StringImplementationNo attempts yet1s256 MBJudgeable
Box intersection volumeCompute the volume shared by N axis-aligned boxes by intersecting their x, y, and z ranges.Easy1MathNo attempts yet1s256 MBJudgeable
Print the input as isRead all input lines and print them unchanged in the same order.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Echo the Input 2Print every input line unchanged, preserving blank lines and leading and trailing spaces.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Sum of digitsAdd N digits given as a single unspaced line and print their sum.Easy1ImplementationStringNo attempts yet1s256 MBJudgeable
Print ten characters per linePrint the given word in chunks of ten characters, one chunk per line.Easy1StringImplementationNo attempts yet1s256 MBJudgeable
EssayPrint B distinct words formed by mapping the decimal digits of 0 to B-1 to letters a to j.Easy1ImplementationStringNo attempts yet1s64 MBJudgeable
TawlaFor each pair of dice rolls, print the combined nickname with the larger value first, using special names for doubles and for 5 and 6.Easy1ImplementationNo attempts yet3s256 MBJudgeable
CardsTwo cards are compared at a time with the smaller pocketed, so find the largest possible sum of pocketed numbers for the given row.Easy1ArrayNo attempts yet1s32 MBJudgeable
Reading numbers in 0.1 secondsRead up to five million natural numbers within 0.1 seconds and print how many were read and their sum.Easy1ImplementationNo attempts yet0.1s512 MBJudgeable
Valentine's DayIgnore any input and print nothing to standard output.Easy1ImplementationNo attempts yet2s512 MBJudgeable
Korea University is lovePrint the fixed Korean string 고려대학교 on one line with no input.Easy1ImplementationNo attempts yet1s32 MBJudgeable
Moving FruitCompute the fewest single-fruit moves between two baskets so one holds only apples and the other holds only oranges.Easy1MathNo attempts yet1s32 MBJudgeable
NNRepeat the decimal form of N exactly N times and print at most its first M characters.Easy1ImplementationStringNo attempts yet1s32 MBJudgeable
Hot fish-shaped bunPrint the given N by M binary picture mirrored left to right.Easy1MatrixImplementationNo attempts yet1s32 MBJudgeable
Choosing subjectsPick the three highest scores among the four science subjects and the higher of history and geography, then print their sum.Easy1GreedySortingNo attempts yet2s512 MBJudgeable
Power of TwoPrint 1 if the given natural number N is a power of two and 0 otherwise.Easy1Bit manipulationNo attempts yet2s512 MBJudgeable
Fence PaintingCompute the total painted length covered by two given intervals on a number line.Easy1IntervalsMathNo attempts yet2s512 MBJudgeable
First SubmissionIgnore any input and print nothing except optional spaces or line breaks.Easy1ImplementationNo attempts yet1s512 MBJudgeable
Last submissionSubmit a program that ignores any input and produces no output.Easy1ImplementationNo attempts yet1s512 MBJudgeable
Midpoint SubmissionIgnore any input and print nothing, since the empty output is the required answer.Easy1ImplementationNo attempts yet1s512 MBJudgeable
Evolving EeveePrint Flareon, the alphabetically first of the three evolution names, regardless of the given level.Easy1ImplementationNo attempts yet1s512 MBJudgeable
Pokemon GO EvolutionGiven a Pokemon number from 1 to 151, print its evolution candy cost from the table, or -1 when it does not evolve.Easy1ArrayImplementationNo attempts yet1s512 MBJudgeable
MD5 scoreConcatenate S, #, and P, hash the result with MD5, and print the sum of the hex digits.Easy1ImplementationNo attempts yet1s512 MBJudgeable
The slowest sudokuPrint the given nine by nine Sudoku grid exactly, using zeros for empty cells.Easy1ImplementationNo attempts yet1s512 MBJudgeable
1 and 2Print 1 without reading input, as the fixed answer is the smaller allowed number.Easy1ImplementationNo attempts yet1s512 MBJudgeable
Nunchi gamePrint the largest allowed integer, 100000, since there is no input and the score equals the printed number.Easy1ImplementationNo attempts yet1s512 MBJudgeable
Magic TrickFind the card shared by the chosen rows of two 4 by 4 layouts, or report a bad layout or cheating.Easy1ArrayImplementationNo attempts yet5s512 MBJudgeable
Rulers of Centauri PrimeGiven T country names, report for each whether a king, a queen, or nobody rules it from its last letter.Easy1StringImplementationNo attempts yet5s512 MBJudgeable
Rulers of Centauri PrimeGiven T country names, print for each whether its last letter marks a king, a queen, or nobody.Easy1StringImplementationNo attempts yet5s512 MBJudgeable
KBO Korean Series Champion NumberGiven the Korean name of a KBO team that won the Korean Series, print the number assigned to that team.Easy1ImplementationString+1No attempts yet2s512 MBJudgeable
HicCupGiven N, add 10N, 10N+10, and 20N+20, then print the total.Easy1MathImplementationNo attempts yet1s32 MBJudgeable
George BooleRead one boolean operation in the form true AND false and print its result.Easy1ImplementationString+2No attempts yet2s512 MBJudgeable
Hands are faster than computersPrint a fixed 4-vertex, 5-edge graph and a fixed proper 4-coloring, with no input to read.Easy1ImplementationGraphNo attempts yet2s512 MBJudgeable
Will floats still pass?Print a fixed two-point set, (0, 0) and (1, 1), with no input; the answer is a constant output.Easy1ImplementationGeometryNo attempts yet2s512 MBJudgeable
A debugging life that starts with std::sortPrint N = 2 and the two points (1, 0) and (0, 1), a fixed counterexample for a broken comparator in std::sort.Easy1ImplementationSorting+2No attempts yet2s512 MBJudgeable
Is Dinic quartic?Print a fixed 4-vertex, 5-edge flow network with the exact edges and capacities given in the statement.Easy1GraphImplementation+1No attempts yet2s512 MBJudgeable
Hamming DistanceRead two n-dimensional integer vectors and count the positions where their entries differ.Easy1ImplementationArrayNo attempts yet1s256 MBJudgeable
Java2016Given a target constant c, print 20 fixed macro definitions and then build one expression by appending a macro for each set bit of c.Easy1ImplementationSimulation+2No attempts yet2s512 MBJudgeable
The Merchant of VeniceSum the cargo values of all ships whose distance is at most s*d, the distance they can cover by the due date.Easy1ImplementationMathNo attempts yet2s512 MBJudgeable
Grass Seed Inc.Given the cost per square metre and a list of rectangular lawns, print the total cost of seeding all of them, rounded to seven decimals.Easy1MathImplementationNo attempts yet2s512 MBJudgeable
HandballGiven each player's goal counts across M matches, count how many players scored at least once in every match.Easy1ArrayImplementationNo attempts yet2s512 MBJudgeable
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.Easy1ImplementationBrute forceNo attempts yet1s512 MBJudgeable
HistogramRead n bar sizes and print one line of exactly k equals signs for each bar size k.Easy1ImplementationStringNo attempts yet2s512 MBJudgeable
Pepero DayIgnore the input and print the exact Korean string 빼빼로 데이 on one line.Easy1ImplementationNo attempts yet2s512 MBJudgeable
Equality CheckRead a quiz line formatted as 'a + b = c' and print YES if a + b equals c, otherwise NO.Easy1ImplementationMathNo attempts yet1s512 MBJudgeable
Tournament SelectionCount wins among six game results and print the group number 1, 2, or 3, or -1 if there are no wins.Easy1ImplementationStringNo attempts yet2s512 MBJudgeable
HelicopterPrint the given ASCII art helicopter exactly as shown, with no trailing spaces on any line.Easy1ImplementationStringNo attempts yet1s512 MBJudgeable
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.Easy1ImplementationString+1No attempts yet2s512 MBJudgeable
TunaFor each tuna, take the larger of two estimates when they differ by at most X, otherwise take a third estimate, and print the sum.Easy1ImplementationMathNo attempts yet1s64 MBJudgeable
Prime Submission NumberA joke problem with no input and no output: the only accepted submission prints nothing.Easy1ImplementationNo attempts yet1s512 MBJudgeable
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.Easy1ImplementationMath+1No attempts yet2s512 MBJudgeable
The Y Bus Goes VroomSimulate the passenger count as a bus travels N stops with given boarding and alighting numbers, then print the driver's fixed name.Easy1SimulationImplementation+1No attempts yet2s256 MBJudgeable
Pick the QuadrantRead the x and y coordinates of a nonzero point and print which of the four quadrants it lies in.Easy1ImplementationMathNo attempts yet1s512 MBJudgeable
Shifty SumGiven N and k, print N + 10N + ... + 10^k N.Easy1MathImplementationNo attempts yet1s512 MBJudgeable
Polynomial Derivative (Small)Given the nonzero terms of a polynomial, compute the value of its derivative at x = 1.Easy1MathImplementation+1No attempts yet1s128 MBJudgeable
FizzBuzzPrint the numbers 1 through N, writing Fizz for multiples of X, Buzz for multiples of Y, and FizzBuzz for multiples of both.Easy1ImplementationMath+2No attempts yet1s512 MBJudgeable
Counting positive integersGiven a list of integers, count how many are strictly greater than zero and print the count.Easy1ImplementationArrayNo attempts yet2s512 MBJudgeable
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
AfricaThis is a travel essay about safaris, Namibian visas, and African destinations; it contains no algorithmic task, input, or output to solve.Easy1ImplementationNo 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