Curated sets

First steps

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

All problems
Total results1,239 problems
TopicsJudge
ResistanceGiven three color names, map each to its digit or multiplier using a fixed table and print the resulting resistance value.Easy1Hash mapImplementationNo attempts yet2s128 MBJudgeable
Escape from a RectangleGiven a point inside an axis-aligned rectangle, compute the minimum distance from the point to the nearest side of the rectangle.Easy1MathGeometry+1No attempts yet2s128 MBJudgeable
Print the AnswerPrint the fixed literal text "문제의 정답" with no input given.Easy1Implementation1 solved50% accepted1s512 MBJudgeable
Palindrome NumbersFor each integer up to 99999 in a terminated input list, print whether its decimal digits form a palindrome.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Counting VowelsFor each input line until a terminating '#', count how many letters are vowels regardless of case.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Compare Two NumbersRead two integers and print whether the first is greater than, less than, or equal to the second.Easy1ImplementationNo attempts yet1s512 MBJudgeable
HexadecimalConvert a hexadecimal number of at most 6 digits into its decimal value and print it.Easy1MathImplementationNo attempts yet2s128 MBJudgeable
MooWrite a program that prints a fixed ASCII art cow exactly, with no input given.Easy1ImplementationNo attempts yet2s128 MBJudgeable
Rugby ClubRead repeated name/age/weight lines until a sentinel and print whether each member is Senior or Junior based on simple thresholds.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Cutting ChocolateCompute the minimum number of straight cuts needed to divide an N by M chocolate bar into all 1x1 pieces.Easy1MathImplementationNo attempts yet2s128 MBJudgeable
QuackPrint a fixed ASCII-art duck exactly, matching every character and line with no input.Easy1ImplementationStringNo attempts yet1s128 MBJudgeable
CrowingPrint a fixed ASCII art rooster with no input, matching the exact spacing and characters.Easy1ImplementationStringNo attempts yet1s128 MBJudgeable
Livestock CountPrint a fixed, exact livestock count table with no computation involved.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Clay PotPrint a fixed ASCII-art shape of a clay pot exactly as specified, with no algorithmic content.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Print the Star PatternPrint a fixed, predetermined star pattern made only of periods and asterisks, with no input.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Dobby's English StudyFor each line, count how many times a given letter (case-insensitive) appears in a sentence until a line with only '#' ends input.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
HowlPrint a fixed wolf ASCII art picture exactly, with no input and no extra spaces.Easy1ImplementationStringNo attempts yet1s128 MBJudgeable
RookPrint a fixed ASCII-art picture of a chess rook exactly as given, with no extra spaces or lines.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Safari WorldRead two integers and print the absolute value of their difference.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Star Printing - 1Given N, print a triangle pattern where line i contains exactly i stars.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Print Stars - 3Print N lines of stars where the count decreases from N down to 1.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Print Stars - 4Print a right-aligned triangle of stars with N stars on the first line decreasing to 1 star on the last line.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Print Stars - 5Print a centered pyramid of stars with N lines, where line i has 2i-1 stars padded with spaces.Easy1ImplementationSimulationNo attempts yet1s128 MBJudgeable
Star Printing 9Print an hourglass-shaped star pattern of stars and spaces based on an integer N.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Verification DigitCompute the check digit as the sum of squares of five given digits, mod 10.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Yutnori Throw ClassificationClassify three yut-stick throws into one of five results based on how many of four values equal 0.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Star Printing - 12Print a diamond-like pattern of N to 1 to N stars with leading spaces forming 2N-1 lines.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Star Printing - 13Given N, print a pyramid of stars that grows one star per line up to N then shrinks back down, using 2N-1 lines total.Easy1ImplementationSimulationNo attempts yet1s128 MBJudgeable
Oven ClockGiven a start time and a number of minutes to cook, compute and print the finishing time on a 24-hour clock.Easy1MathSimulationNo attempts yet1s128 MBJudgeable
Print the BirthdayPrint a fixed hardcoded birthday date in month/day format with no real input or logic.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Print an Asterisk SquareRead an integer N and print an N by N square made of asterisk characters.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Hello WorldPrint the fixed string 'Hello World!' with no input required.Easy1Implementation1 solved100% accepted1s128 MBJudgeable
Sum of Two Numbers - 2Read two single-digit integers from separate lines and print their sum.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Maximum ValueRead nine distinct natural numbers and print the maximum value along with its 1-based position.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Odd NumbersGiven seven natural numbers, print the sum of the odd ones and the smallest odd one, or -1 if none exist.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Average and MedianRead five natural numbers and print their average and median.Easy1SortingArray+1No attempts yet1s128 MBJudgeable
MultiplicationGiven two three-digit numbers, print the partial products from vertical multiplication and their total.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
String RepetitionGiven repeat count R and string S, output the string formed by repeating each character of S exactly R times in order.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Least Common Multiple and Greatest Common DivisorFor multiple integer pairs, compute and print each pair's least common multiple and greatest common divisor.Easy1MathNumber theoryNo attempts yet1s128 MBJudgeable
Typo Man Go ChangyoungGiven a string and a 1-based position, output the string with that one character removed, for multiple test cases.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Matrix AdditionRead two N by M integer matrices and print their element-wise sum.Easy1MatrixImplementationNo attempts yet1s128 MBJudgeable
Multiplication TablePrint the multiplication table for a given integer N from N*1 to N*9 in the exact required format.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Print Numbers up to NRead an integer N and print every integer from 1 to N on separate lines.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Print N DownwardRead a number N and print integers from N down to 1, one per line.Easy1ImplementationNo attempts yet1s128 MBJudgeable
Word LengthRead a word of at most 100 letters and print its length.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Toggle Alphabet CaseRead a word up to length 100 and print it with every letter's case swapped.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Fibonacci NumberCompute the nth Fibonacci number for n up to 45.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Sort NumbersRead N integers and print them sorted in ascending order, one per line.Easy1SortingNo attempts yet1s128 MBJudgeable
Sorting Three NumbersRead three distinct integers and print them sorted from smallest to largest.Easy1SortingNo attempts yet1s128 MBJudgeable
Leap YearGiven a year, output 1 if it is a leap year according to the standard divisibility rule, otherwise output 0.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Grade Point CalculationRead a letter grade string and print its corresponding fixed grade point value from a lookup table.Easy1ImplementationHash mapNo attempts yet1s128 MBJudgeable
Beautiful NumberFor each given integer, count how many distinct decimal digits it contains.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Study Abroad BanDelete every character in a given uppercase word that appears in the letters of 'CAMBRIDGE' and print the rest.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
After the PartyCompute actual attendees as L times P, then output the difference between each of five reported counts and that value.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
FBIGiven five agent codes, print the 1-based positions of those containing the substring FBI, or a fixed message if none do.Easy1StringImplementationNo attempts yet0.25s128 MBJudgeable
Alarm ClockGiven an alarm time in hours and minutes, compute and print the time 45 minutes earlier, wrapping around midnight if needed.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
SangsuReverse two given three-digit numbers digit by digit and print the larger reversed value.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Musical ScaleGiven a permutation of 1 through 8, print whether it is strictly ascending, strictly descending, or otherwise mixed.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Completing a Chess SetGiven counts of six white chess piece types, output how many of each must be added or removed to reach a complete 16-piece set.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Find R2Given R1 and the average S of two integers, compute and print the other integer R2.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
ABCSort three distinct numbers into A, B, C and print them in an order given by a 3-letter permutation string.Easy1SortingImplementationNo attempts yet1s128 MBJudgeable
RemaindersRead ten nonnegative integers, compute each mod 42, and print how many distinct remainder values occur.Easy1Hash mapImplementationNo attempts yet1s128 MBJudgeable
Taxicab GeometryGiven radius R, compute and print the area of a Euclidean circle and a taxicab-metric circle.Easy1MathGeometry+1No attempts yet1s128 MBJudgeable
Sum of Missing CharactersFor each string, sum the ASCII values of uppercase letters that never appear in it.Easy1StringHash map+1No attempts yet1s128 MBJudgeable
SharesFor repeated pairs N and S, print the largest integer x such that N times x does not exceed S.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Is the First Number Greater?For each pair of positive integers read until a 0 0 line, print Yes when the first is greater than the second, otherwise No.Easy1ImplementationNo attempts yet1s128 MBJudgeable
The Good and the BadCount the letters g and b in each hero name, ignoring case, and print whether the name is GOOD, A BADDY, or NEUTRAL.Easy1StringImplementation+1No attempts yet1s128 MBJudgeable
Capitalize the First LetterRead N sentences and print each one with its first letter changed to uppercase, leaving every other character as is.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Line NumbersRead N lines of text and print each one prefixed with its 1-based line number in the format "number. content".Easy1ImplementationStringNo attempts yet1s128 MBJudgeable
The Navi-Computer is Down!Read pairs of 3D coordinates and system names, and print the Euclidean distance between each pair rounded to two decimals.Easy1MathImplementation+1No attempts yet1s128 MBJudgeable
No BrainerFor each zombie, compare the number of brains it eats X with the number it needs Y, and print whether X is at least Y.Easy1ImplementationBrute forceNo attempts yet1s128 MBJudgeable
Speed LimitGiven segments of constant speed with cumulative elapsed times, compute the total distance for each data set until n equals -1.Easy1ImplementationMath+1No attempts yet1s128 MBJudgeable
Clay BullyFor each class, read each student's block dimensions and name, then print the bully with the largest volume and the victim with the smallest volume.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
LunacyFor each non-negative Earth weight read until a negative sentinel, print a sentence giving the weight on the Moon at 0.167 times the Earth weight, both rounded to two decimals.Easy1ImplementationMathNo attempts yet1s128 MBJudgeable
Mirror, Oh! MirrorRead lines of ASCII text until a line of three asterisks, and print each line with its characters reversed.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Counting LinesRead all input lines, including empty ones, and print how many there are.Easy1ImplementationStringNo attempts yet1s128 MBJudgeable
Spinner Lock SimulationGiven the starting digits of a spinner lock and a sequence of button labels, add each label's digits to the wheels modulo 10 and print the final readout.Easy1SimulationImplementation+2No attempts yet1s128 MBJudgeable
PhD ProgramRead N problems, output a+b for each addition line and 'skipped' for the line P=NP.Easy1ImplementationStringNo attempts yet1s128 MBJudgeable
TGN Advertising DecisionFor each test case, compare the no-ad revenue r against e minus c, then print advertise, do not advertise, or does not matter.Easy1ImplementationMathNo attempts yet1s128 MBJudgeable
Triangle and Its Three SidesRead triples of positive integers until 0 0 0, and for each print Equilateral, Isosceles, Scalene, or Invalid based on equal sides and the triangle inequality.Easy1ImplementationMath+1No attempts yet1s128 MBJudgeable
Divisors and MultiplesFor each pair of numbers, print factor if the first divides the second, multiple if the first is a multiple of the second, or neither.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Sarah's ToysFor each night, subtract the toys left around the house from the total, then report how many pairs and whether one group of 3 is formed.Easy1MathImplementation+1No attempts yet1s128 MBJudgeable
Pair SumThis is a straightforward simulation task where numbers in each test case are used to enumerate pairs. For each input n, all pairs of distinct natural numbers with sum n are printed in lexicographic order. Because n is at most 12, iterating all possible a and b values directly works. Implemented with simple loops, this problem is a typical warm-up exercise.Easy1SimulationBrute force+1No attempts yet1s128 MBJudgeable
Even Sum Versus Odd SumFor each of up to 50 sequences, add the even numbers and the odd numbers separately and print EVEN, ODD, or TIE based on which sum is larger.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
WelcomePrint the three-line ASCII art that spells the word Welcome, matching every space and symbol exactly.Easy1ImplementationStringNo attempts yet1s128 MBJudgeable
Call CenterPrint a fixed piece of ASCII art of C3PO sitting at a call center, matching the example exactly.Easy1ImplementationStringNo attempts yet1s128 MBJudgeable
PyramidsFor each positive base size n until a terminating 0, print the total number of blocks in a pyramid whose layers count down from n to 1.Easy1MathImplementation+2No attempts yet1s128 MBJudgeable
BillingRead item names until EOI and print the total cost of all listed supplies with a dollar sign and two decimals.Easy1Hash mapImplementationNo attempts yet1s128 MBJudgeable
Battle Droid PriceFor each test case, multiply five part quantities by fixed prices, sum them, and print the total with a dollar sign and two decimals.Easy1MathImplementation+2No attempts yet1s128 MBJudgeable
Card GameRead five round scores and print their sum.Easy1ArrayImplementationNo attempts yet1s256 MBJudgeable
Match ResultsRead N rounds of scores for A and B, and report how many rounds each player won.Easy1ImplementationSimulationNo attempts yet1s256 MBJudgeable
Entry Log ManagementRead N names and print each one converted to lowercase, one per line.Easy1StringImplementationNo attempts yet1s256 MBJudgeable
SanggeunaldGiven prices for three burgers and two drinks, print the lowest cost of one burger plus one drink minus a 50 won combo discount.Easy1ImplementationMath+2No attempts yet1s128 MBJudgeable
The Errand RouteAdd four travel times given in seconds and print the total split into minutes on the first line and seconds on the second.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
ReceiptGiven the total price of 10 books and the prices of 9 of them, find the missing book's price.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
JOI and IOICount how many length-3 windows of a string equal JOI and how many equal IOI, including overlaps.Easy1StringBrute force+1No attempts yet1s128 MBJudgeable
Exam ScoresGiven the four subject scores of two students, print the larger of the two totals, or Minguk's total when they tie.Easy1ImplementationMathNo attempts yet1s128 MBJudgeable
Find the Students Who Didn't SubmitGiven 28 distinct attendance numbers from 1 to 30, print the two missing numbers in increasing order.Easy1ArrayImplementationNo attempts yet1s128 MBJudgeable
Hot DogsRead pairs of integers H and P until end of file and print H/P rounded to exactly two decimal places.Easy1MathImplementationNo attempts yet1s128 MBJudgeable
Sanggeun's FriendsFor each test case, read the counts of male and female friends and print their sum; stop at the two zeros line.Easy1MathImplementationNo attempts yet1s128 MBJudgeable