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 results14,366 problems
TopicsJudge
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
Longest Run of X'sCount the longest run of consecutive X marks in each hallway and print its length in the required sentence.Easy1ArrayNo attempts yet1s256 MBJudgeable
Count VowelsCount the vowels a, e, i, o, and u in each given lowercase word and print the result in the required sentence.Easy1StringNo attempts yet1s256 MBJudgeable
Heracles and the HydraStarting from h heads, each c adds one head and each b removes one, and you report the count left after all actions.Easy1SimulationNo 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
ACM HotelGuests fill rooms column by column from the elevator with lower floors first, so print the room number of the Nth guest.Easy1MathNo attempts yet1s256 MBJudgeable
Golden Khon KaenCount how many times the word GOLDEN can be formed from each given string of capital letters.Easy1Hash mapNo attempts yet10s64 MBJudgeable
Reverse RotReverse each message, then shift every character forward by N places in the 28-symbol alphabet.Easy1StringSimulationNo 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
The fellowship of the ringCount how many of the P punch heights fall within the fair range from waist height W to neck height N.Easy1ArrayNo attempts yet1s256 MBJudgeable
ServerCount how many jobs from the front finish in request order before their total duration exceeds T.Easy1Prefix sumSimulationNo attempts yet1s256 MBJudgeable
Mod ArithmeticGiven A, B and C, print (A+B)%C, ((A%C)+(B%C))%C, (AxB)%C and ((A%C)x(B%C))%C on four lines.Easy1MathNo attempts yet1s256 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
Quite a problemPrint yes for each input line that contains problem in any capitalization, even inside longer words, and no otherwise.Easy1String matchingStringNo 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
Subin and the SequenceGiven the prefix averages of a sequence, recover the original sequence term by term.Easy1Prefix sumMathNo attempts yet1s32 MBJudgeable
Mosquito TrapFind the smallest area of an axis-aligned square that covers all given points on the table.Easy1GeometryNo attempts yet1s32 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
PolyhedronFor each test case, compute the face count of a convex polyhedron from V and E with Euler formula F = 2 - V + E.Easy1MathNo attempts yet5s256 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
Kings of PersiaGiven birth and death year ranges, compute the smallest and largest possible age for each king.Easy1MathNo attempts yet2s256 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
Happy or SadCount the happy (:-)) and sad (:-( ) emoticons in the message and print happy, sad, unsure, or none.Easy1StringNo attempts yet1s256 MBJudgeable
Traffic Day BanCount how many of the five given car number digits match the date digit.Easy1ImplementationArrayNo attempts yet1s256 MBJudgeable
Vertical ReadingRead five given words column by column from top to bottom, skipping missing letters in shorter words, and print the letters in that order.Easy1SimulationArray+1No attempts yet1s256 MBJudgeable
Card GameCompare the ten cards of A and B round by round and print A or B for the side with more round wins, or D on a tie.Easy1ArraySimulationNo attempts yet1s256 MBJudgeable
Reversing Card SegmentsReverse ten given segments of a 20-card row that starts in order and print the final arrangement.Easy1ArraySimulationNo attempts yet1s256 MBJudgeable
Count ValueCount how many times the integer v appears among the N given integers.Easy1ArrayNo attempts yet1s256 MBJudgeable
Alphabet CountCount how many times each letter from a to z appears in the given lowercase word.Easy1ArrayNo attempts yet1s256 MBJudgeable
Find the AlphabetGiven a lowercase word of length at most 100, output the 0-based first index of each letter a to z, or -1 when absent.Easy1ArrayStringNo attempts yet1s256 MBJudgeable
Insert BallsFill N baskets by writing ball number k into baskets i through j for each operation, then print all baskets.Easy1ArraySimulationNo attempts yet1s256 MBJudgeable
Swap BallsSwap the balls in the given basket pairs M times and print the final ball in each of the N baskets.Easy1SimulationArrayNo attempts yet1s256 MBJudgeable
Three NumbersPrint the median of three given integers between 1 and 100.Easy1SortingNo attempts yet1s256 MBJudgeable
Minimum and MaximumRead N integers and print the smallest and the largest separated by a space.Easy1ArrayNo 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 Integer CountCount the maximal runs of digits in a comma-separated digit string.Easy1StringNo 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
Binary ConversionPrint the binary representation of the given natural number N with no leading zeros.Easy1Bit manipulationNo attempts yet1s256 MBJudgeable
ApplesEach school splits its apples evenly among its students, and the program sums the leftover apples.Easy1MathNo 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
Extreme SortCheck whether the given numbers are in non-decreasing order and print yes or no.Easy1ArraySortingNo 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
The nth Fibonacci NumberGiven n up to 20, compute the nth Fibonacci number defined from 0 and 1.Easy1Dynamic programmingRecursionNo attempts yet1s256 MBJudgeable
Numbers Smaller Than XPrint the elements of the sequence that are smaller than X in their original order.Easy1ArrayNo 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
Ancient symbolGiven integer x, print 111 times x squared plus 11 times x plus 1.Easy1MathNo 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
??!Print the given id with ??! appended to it.Easy1StringNo 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
SHA-512Print the SHA-512 hash of an alphanumeric string up to 50 characters long as lowercase hexadecimal.Easy1ImplementationNo attempts yet1s256 MBJudgeable
BASE16 EncodingRead a string of up to 50 letters and digits and print each character as two uppercase hex digits in order.Easy1ImplementationStringNo attempts yet1s256 MBJudgeable
BASE16 DecodingDecode a BASE16 string by converting each pair of hex digits back into its ASCII character.Easy1StringImplementationNo attempts yet1s256 MBJudgeable
Random gamePrint the integer 5 on the first line with no input.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Random gamePrint the number 1 on one line with no input.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Random gamePrint 1, the smallest integer from 1 to 2,147,483,647, with no input.Easy1ImplementationNo attempts yet1s256 MBJudgeable
LottoPrint 1 2 3 4 5 6, the lexicographically smallest increasing pick of six numbers from 1 to 45.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Daily lottoPrint 1 2 3 4 5 6, the lexicographically smallest increasing six-number sequence from 1 to 45.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Number baseball 5Print the fixed number 1234 with no input.Easy1ImplementationNo attempts yet1s256 MBJudgeable
A+B with multiple test casesRead T pairs of integers and print each pair's sum on its own line.Easy1ImplementationNo attempts yet1s256 MBJudgeable
A+B until end of inputRead pairs of integers until end of input and print each pair sum on its own line.Easy1ImplementationNo attempts yet1s256 MBJudgeable
A+B until two zerosRead integer pairs until 0 0 and print the sum of each pair on its own line.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Comma-separated A+BAdd pairs of single-digit integers given as comma-separated values for each test case.Easy1ImplementationMathNo attempts yet1s256 MBJudgeable
Compute my GPACompute each semester total credits and credit-weighted GPA from course credits and grades, rounded to one decimal place.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Vowel CountCount how many letters of the given lowercase word are vowels (a, e, i, o, u).Easy1StringImplementationNo attempts yet1s256 MBJudgeable
Palindrome CheckCheck whether the given lowercase word reads the same forward and backward and print 1 or 0.Easy1StringTwo pointersNo attempts yet1s256 MBJudgeable
Star Pattern 17Print a hollow isosceles triangle of height N, with stars on the two sides and a solid star base.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Star Pattern 21Print the star pattern for the given N exactly as the samples show.Easy1ImplementationNo attempts yet1s256 MBJudgeable
A×BRead two integers A and B and print their product.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Namuk's Chicken CoopFrom the total number of legs and chickens, find how many chickens lost a leg and how many are intact.Easy1MathNo attempts yet2s256 MBJudgeable
A+B for each test caseAdd two single-digit integers per test case and print each sum as Case #x: y.Easy1ImplementationNo attempts yet1s256 MBJudgeable
A+B with case numbersRead T pairs of single-digit integers and print each sum as Case #x: A + B = C.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Sum of the Numbers on One LineAdd all the space-separated numbers on the first line and print the total.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Sum 4Add the integers on each of T input lines and print each sum on its own line.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Use Every LetterDecide for each of up to 50 sentences whether it contains every letter a to z, and list the missing letters otherwise.Easy1StringArrayNo attempts yet2s256 MBJudgeable
Simon SaysPrint the trailing part of every command that starts with 'Simon says' and skip all other commands.Easy1StringImplementationNo attempts yet2s256 MBJudgeable
Help Chelsea!For each test case, print the name of the player with the highest price from the given list.Easy1ImplementationNo attempts yet1s256 MBJudgeable
Fridge of Your DreamsConvert each of up to 1000 24-bit binary strings to its decimal form without leading zeros.Easy1ImplementationNo attempts yet1s256 MBJudgeable
The Eccentric ProfessorCompare n times s against d plus n times p for each test case and print which option costs less.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Communication ChannelsCompare each transmitted binary string with its received copy and print OK when they match and ERROR otherwise.Easy1StringImplementationNo attempts yet1s256 MBJudgeable
Balancing WeightsYou sum the signed positions of the weights and report whether the lever tips left, tips right, or stays balanced.Easy1ImplementationMathNo attempts yet1s256 MBJudgeable
Cookie LoverGiven N cookies and C eaten per day, compute how many days pass until none remain.Easy1MathImplementationNo attempts yet1s256 MBJudgeable
Angry Grammar SticklerThe program counts banned words and phrases in each sentence and prints ten times that count.Easy1StringImplementationNo attempts yet1s256 MBJudgeable