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 results1,785 problems
TitleLevelTopicsSolvedTime limitMemory limitJudge
PiratesGiven a lowercase word, find the letter with the highest frequency and print that letter with its count.Easy2StringHash map+1No attempts yet2s512 MBJudgeable
Password checkFor each of N passwords, report valid if it has a lowercase letter, uppercase letter, digit, symbol, and length at least 12, else invalid.Easy2StringImplementationNo attempts yet2s512 MBJudgeable
Hissing MicrophoneGiven a lowercase string, check whether it contains two consecutive s characters and print hiss or no hiss.Easy2StringImplementationNo attempts yet1s512 MBJudgeable
Life ScoreFor each name, sum the letter values (A=1 to Z=26, spaces worth 0) and print the total, or PERFECT LIFE when the total is exactly 100.Easy2StringImplementationNo attempts yet2s512 MBJudgeable
Big number A+BRead two integers with up to 10000 digits and print their sum without leading zeros.Easy2StringMath+2No attempts yet1s256 MBJudgeable
Check the CheckRead dish names and price-quantity pairs until the line TOTAL, then print PAY if the waiter's total is at most the sum of price times quantity, else PROTEST.Easy2ImplementationString+1No attempts yet2s512 MBJudgeable
Lorem ipsumSplit a fixed Latin placeholder paragraph into words and print the words at indices L through R separated by spaces.Easy2StringImplementation+1No attempts yet0.1s512 MBJudgeable
Hash collision stringsPrint two length-N strings that differ but have equal Java String hashCode values, using the classic Aa/BB collision with a shared prefix.Easy2StringHash map+2No attempts yet2s512 MBJudgeable
Binary GamePrint the binary representations of 0 through n, concatenated with no separators.Easy2StringImplementationNo attempts yet1s256 MBJudgeable
RickRead one line and print NO if it exactly matches one of six given phrases, otherwise print YES.Easy2StringImplementationNo attempts yet1s256 MBJudgeable
Derivative of a polynomial functionParse a linear polynomial written like 3x+5 or -x+2 and print the constant that is its derivative.Easy2StringImplementation+1No attempts yet1s512 MBJudgeable
Master of the Shell GameGiven a string, perform T swaps of characters at the given 0-indexed positions in order and print the final string.Easy2StringSimulation+1No attempts yet1s128 MBJudgeable
What Is Your HandleSort N distinct handles by ASCII dictionary order and print the I-th one.Easy2SortingString+1No attempts yet1s512 MBJudgeable
Caesar CipherShift every letter of a string by k positions in the alphabet, wrapping around, and leave spaces, periods, and commas unchanged.Easy2StringImplementation+1No attempts yet1s64 MBJudgeable
What Does UCPC Stand For?Given one string, decide whether deleting some characters can leave exactly the subsequence UCPC, case sensitive.Easy2StringGreedy+1No attempts yet1s512 MBJudgeable
Occupy ParkingCount how many of the N parking spaces show 'C' in both the yesterday string and the today string.Easy2StringImplementation+1No attempts yet2s512 MBJudgeable
Baby BitesGiven n spoken words that are either "mumble" or a number, check if the i-th number equals i and output "makes sense" or "something is fishy".Easy2ImplementationStringNo attempts yet1s512 MBJudgeable
Run-Length Encoding, Run!Encode a string as run-length pairs, or decode run-length pairs back to the original string.Easy2StringSimulationNo attempts yet2s512 MBJudgeable
Time to DecompressRead L lines, each with a count N and a character, and print that character repeated N times on its own line.Easy2StringImplementationNo attempts yet1s512 MBJudgeable
XORChicGiven an XOR-encrypted string whose first 8 characters decode to "CHICKENS", recover the key and output the original string.Easy2ImplementationBit manipulation+2No attempts yet1s256 MBJudgeable
99 Bottles of BeerGiven N, print the full lyrics of the N Bottles of Beer song, with correct singular and plural wording.Easy2ImplementationString+2No attempts yet1s512 MBJudgeable
Cute Number~ε٩(๑> ₃ <)۶зGiven an integer up to 10^18, check whether its digits form an arithmetic sequence with a constant difference, and print one of two fixed messages.Easy2ImplementationMath+2No attempts yet1s512 MBJudgeable
What's the Second Baseman's NameGiven up to 1000 player names, check whether any name equals the string anj and print one of two fixed messages.Easy2ImplementationStringNo attempts yet1s512 MBJudgeable
Bonus ScoreGiven a string of O and X for N problems, compute the total score where problem i gives i points plus a running bonus that grows on each O and resets on each X.Easy2ImplementationSimulation+1No attempts yet1s512 MBJudgeable
What Is a Recursive Function?Given N, print the chatbot message 'What is a recursive function?' repeated with nested quotation marks for N levels of recursion.Easy2ImplementationString+1No attempts yet1s256 MBJudgeable
369Count the total claps in the 369 game from 1 to N, where each number contributes one clap per digit that is 3, 6, or 9.Easy2ImplementationMath+2No attempts yet1s512 MBJudgeable
Mangling NamesGiven a table of pronunciation times by vowel and consonant counts, sum the times for each student name and report the total.Easy2ImplementationString+2No attempts yet2s512 MBJudgeable
CommandFor each of T strings, decide whether it has length 7 and its characters follow the exact pattern AABBABB with exactly two distinct letters.Easy2StringImplementation+1No attempts yet0.5s256 MBJudgeable
Regional Team NamesDecide whether a string splits into an institution part of 2 to 8 characters, a hyphen, then a team name of 1 to 24 characters.Easy2StringImplementationNo attempts yet1s512 MBJudgeable
Pea Soup and PancakesRead each restaurant's name and menu, then print the first one serving both pea soup and pancakes, or a fixed fallback line if none does.Easy2ImplementationString+2No attempts yet1s512 MBJudgeable
ÖstgötskaCount how many space-separated words contain the substring "ae"; if that count is at least 40 percent of the words, print one fixed phrase, otherwise the other.Easy2StringImplementation+1No attempts yet1s512 MBJudgeable
TapiokaGiven a three-word dish name, remove the words "bubble" and "tapioka", then print the remaining words or "nothing" if none remain.Easy2StringImplementationNo attempts yet2s1024 MBJudgeable
Lucky StraightGiven an even-length number, decide whether the sum of its left-half digits equals the sum of its right-half digits, printing LUCKY or READY.Easy2StringImplementation+2No attempts yet1s256 MBJudgeable
CapitalizationReplace every occurrence of the substring "joi" in a lowercase string with "JOI" and print the result.Easy2StringImplementationNo attempts yet2s512 MBJudgeable
BananaRead a dictionary mapping English words to Minionese words, then translate each of T sentences word by word.Easy2Hash mapString+2No attempts yet2s512 MBJudgeable
Divisionals SpellingGiven n words and a contest with m questions labeled A onward, count how many words use only distinct letters from the first m letters.Easy2ImplementationString+1No attempts yet1s512 MBJudgeable
RebusSplit the input into space-separated words, strip leading and trailing apostrophes by removing that many letters from each end, then concatenate the pieces.Easy2StringImplementationNo attempts yet2s512 MBJudgeable
Minimum String DifferenceSlide the shorter string A across every possible alignment position over B and output the minimum number of mismatched characters.Easy3StringSliding window+1No attempts yet2s128 MBJudgeable
Strange MultiplicationGiven two large numbers as digit strings, compute the sum of all pairwise products of their digits, which equals the product of their digit sums.Easy3MathString+1No attempts yet2s256 MBJudgeable
Student NumbersGiven N equal-length numeric strings, find the smallest suffix length k so that all suffixes of length k remain distinct.Easy3StringBrute force+1No attempts yet2s128 MBJudgeable
Binary AdditionAdd two binary strings up to 80 digits long and print the sum in binary without leading zeros.Easy3StringMath+1No attempts yet2s128 MBJudgeable
Make a PalindromeGiven a lowercase string of length at most 50, find the minimum length of a palindrome obtained by appending characters only to its end.Easy3StringBrute force+1No attempts yet2s128 MBJudgeable
Shortcut Key AssignmentAssign each menu option an unused shortcut letter by checking word-initial letters first, then any letter in the string, following the options in order.Easy3SimulationString+1No attempts yet2s128 MBJudgeable
Binary to Octal ConversionConvert a binary number with up to 1,000,000 digits into its octal representation.Easy3Bit manipulationMath+2No attempts yet1s128 MBJudgeable
MessagesGiven sheets of names passed around a circle with P/N marks, find who wrote each hurtful (N) message and about whom.Easy3SimulationArray+2No attempts yet1s128 MBJudgeable
Serial NumbersSort serial numbers by length, then digit-sum, then a custom lexicographic rule where digits precede letters.Easy3SortingString+1No attempts yet2s128 MBJudgeable
Lost ParenthesesGiven an arithmetic expression with only plus and minus signs, place parentheses to minimize the evaluated result.Easy3GreedyString+1No attempts yet2s128 MBJudgeable
Cyclic WordsCount how many words are distinct once each is allowed to be read starting from any position around a circle.Easy3StringBrute force+1No attempts yet2s128 MBJudgeable
I Am Pokemon Master DasomBuild a bidirectional mapping between Pokemon numbers and names, then answer up to 100,000 lookup queries either way.Easy3Hash mapImplementation+1No attempts yet2s256 MBJudgeable
Common PermutationFor each pair of input strings, count letter frequencies and output the multiset intersection sorted alphabetically as the longest common rearranged subsequence.Easy3Hash mapString+1No attempts yet2s128 MBJudgeable
Lucky TicketFind the longest even-length substring of a digit string whose first half digit sum equals its second half digit sum.Easy3Prefix sumBrute force+2No attempts yet2s128 MBJudgeable
DNA DecodingRepeatedly merge the last two bases of a DNA string using a fixed lookup table until one base remains, then output it.Easy3SimulationString+1No attempts yet5s16 MBJudgeable
CrosswordGiven a filled crossword grid, extract every maximal horizontal or vertical run of letters of length at least two and output the lexicographically smallest such word.Easy3StringImplementation+1No attempts yet2s128 MBJudgeable
CipherEncrypt a lowercase text by shifting each letter backward in the alphabet by the position value of a repeating key letter, leaving spaces unchanged but still consuming a key character.Easy3StringSimulation+1No attempts yet2s256 MBJudgeable
Number Word SortSort integers from M to N by comparing their digits spelled out as English words rather than by numeric value, then print 10 per line.Easy3SortingString+1No attempts yet2s128 MBJudgeable
Password GenerationGenerate all length-L increasing letter combinations from a given set of C letters that contain at least one vowel and two consonants, printed in lexicographic order.Easy3BacktrackingBrute force+1No attempts yet2s128 MBJudgeable
Common NamesGiven two lists of unique lowercase names, find and print the count and sorted list of names common to both.Easy3Hash mapSorting+1No attempts yet2s256 MBJudgeable
Multiple of ThreeGiven a huge number as a digit string, repeatedly sum its digits until one digit remains, then report how many steps it took and whether the number is divisible by 3.Easy3StringMath+1No attempts yet2s128 MBJudgeable
CipherGiven an encrypted string built by zigzag row reading of a column-filled table, reconstruct the original string for a given number of columns.Easy3SimulationMatrix+2No attempts yet2s128 MBJudgeable
Broken OdometerConvert an odometer reading that skips the digit 4 back into the real distance traveled, using a base-9-like digit mapping.Easy3MathImplementation+1No attempts yet0.5s128 MBJudgeable
Carbon CompoundsParse three molecules of C,H,O atoms and find coefficients 1 to 10 for each side that balance atom counts, lexicographically smallest.Easy3Brute forceString+1No attempts yet2s128 MBJudgeable
Postfix Expression Evaluation 2Evaluate a postfix expression using given operand values and print the result rounded to two decimal places.Easy3StackString+1No attempts yet2s128 MBJudgeable
DNAGiven N DNA strings of length M, construct the string minimizing total Hamming distance to all, breaking ties lexicographically, and output that distance.Easy3StringGreedy+1No attempts yet2s128 MBJudgeable
Surprising StringFor each string, check for every gap size whether all pairs of letters at that fixed distance are distinct, and report if the string is 'surprising'.Easy3StringBrute force+1No attempts yet2s128 MBJudgeable
OvertakingGiven entry and exit orders of N cars, count how many cars are not part of the longest common subsequence, meaning they overtook someone.Easy3Dynamic programmingArray+1No attempts yet2s128 MBJudgeable
Text MessageSimulate typing a message on a numeric keypad, summing key press costs and extra wait times when consecutive characters share a key (except spaces).Easy3SimulationString+1No attempts yet2s128 MBJudgeable
DNA Decoding 2Given a DNA string up to 20 million bases, repeatedly collapse the rightmost two characters using a lookup table until one base remains.Easy3StringSimulation+1No attempts yet1s2 MBJudgeable
Distinguishing FilesGiven N files as sequences padded with zeros, find the minimum prefix length K that makes all files pairwise distinct.Easy3StringBrute force+1No attempts yet2s128 MBJudgeable
SaschaGiven a pronounced word and a dictionary of same-length words, find the dictionary word with the minimum Hamming distance, breaking ties by input order.Easy3StringBrute force+1No attempts yet2s128 MBJudgeable
Secret LetterDecode a binary string into 6-bit chunks matching a fixed 8-letter code table by Hamming distance at most 1, printing the first unidentifiable chunk's position if any.Easy3StringBrute force+1No attempts yet1s128 MBJudgeable
Similar WordsCount how many words differ from the first word's letter multiset by at most one insertion, deletion, or substitution.Easy3Hash mapString+1No attempts yet1s128 MBJudgeable
Roman NumeralsConvert two Roman numerals to integers, sum them, and output the sum as both an Arabic and a Roman numeral.Easy3StringMath+1No attempts yet1s128 MBJudgeable
Spreadsheet Cell NamesConvert given row and column numbers into spreadsheet-style cell names like A1 or BC23, stopping at R0C0.Easy3MathString+1No attempts yet1s128 MBJudgeable
Window BlindsParse a grid of ASCII-drawn window blinds and count how many of the M×N windows show each of five possible blind heights.Easy3SimulationImplementation+1No attempts yet1s128 MBJudgeable
Make a CrosswordBuild a grid where word A is placed horizontally and word B vertically, crossing at the first shared letter following a defined scan rule, filling the rest with dots.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
Math HomeworkExtract every maximal run of digits from up to 100 strings, strip leading zeros, and print all extracted numbers sorted nondecreasing.Easy3StringSorting+1No attempts yet1s128 MBJudgeable
Machine CodeGiven a sequence of instructions with parameters, compute the minimum NOPs needed so each instruction starts at an address divisible by 4.Easy3GreedySimulation+1No attempts yet1s128 MBJudgeable
Rock-Paper-Scissors ScoreGiven a player's rock-paper-scissors choices against several friends over multiple rounds, compute the actual score and the best possible score with foreknowledge each round.Easy3SimulationGreedy+1No attempts yet1s128 MBJudgeable
NoiseGiven two powers of ten with up to 100 digits and an operator, compute their sum or product using big-number arithmetic.Easy3MathString+1No attempts yet1s128 MBJudgeable
Croatian AlphabetParse a string left to right, greedily matching multi-character Croatian letter codes (like c=, dz=, lj), and count total letters.Easy3StringGreedy+1No attempts yet1s128 MBJudgeable
Three PartsSplit a short lowercase string into three contiguous non-empty parts, reverse each part, and find the split that yields the lexicographically smallest concatenation.Easy3Brute forceString+1No attempts yet1s128 MBJudgeable
Secret EmailGiven an encrypted string, find matrix dimensions R<=C with R*C=N and largest R, then reverse a row-major-write column-major-read transposition to recover the original message.Easy3MatrixString+1No attempts yet1s128 MBJudgeable
Lexicographically Smallest Crossword WordExtract all horizontal and vertical maximal letter sequences of length at least 2 from a grid and output the lexicographically smallest one.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
IPv6Given a shortened IPv6 address with omitted leading zeros and possibly one '::' run, expand it into eight full 4-digit hex groups.Easy3StringImplementationNo attempts yet1s128 MBJudgeable
Rhyme PatternGiven verses of four lines, extract each line's last syllable from its final word and classify the rhyme pattern as perfect, even, cross, shell, or free.Easy3StringImplementationNo attempts yet1s128 MBJudgeable
Most Visited DomainsParse a list of URLs to extract each domain suffix and print the maximum visit count along with all domains that reach it, sorted alphabetically.Easy3StringHash map+1No attempts yet1s128 MBJudgeable
DECODEBuild a substitution cipher table from a key word placed at a given offset, then decode a given ciphertext using it.Easy3StringSimulation+1No attempts yet1s128 MBJudgeable
Reaux! Sham! Beaux!Parse rock-paper-scissors rounds given in multiple languages per player, tally wins, and print each game's score and winner.Easy3StringHash map+1No attempts yet1s128 MBJudgeable
Bug KingRepeatedly remove all occurrences of the substring "BUG" from each input line, using a stack-like scan since removals can form new matches, until none remain.Easy3StackStringNo attempts yet1s128 MBJudgeable
Character RecognitionRead multi-line text blocks separated by blank lines, count '#' as unrecognized characters, and print the recognition percentage formatted with rounding rules.Easy3StringImplementationNo attempts yet1s128 MBJudgeable
Adding Reversed NumbersReverse two given numbers, add them, then output the sum reversed with leading zeros dropped.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
Turing Arithmetic ExpressionsGiven up to nine large integers and an arithmetic expression using them, evaluate the expression under mod-10 addition and multiplication with normal precedence and print the result digit.Easy3MathString+1No attempts yet1s128 MBJudgeable
Whitespace King: Aligning ColumnsReformat text lines so that words in each column line up to a width equal to the longest word in that column, with single spaces separating columns.Easy3StringImplementation+1No attempts yet1s128 MBJudgeable
Alien Communication MasterclassGiven true bases and false bases, output a fixed-form product-of-factors equation that holds only for the true bases in that numeral system.Easy3MathImplementation+1No attempts yet3s256 MBJudgeable
Java vs C++Detect whether a name follows Java camelCase or C++ snake_case rules and convert it to the other style, or print an error if invalid.Easy3StringImplementationNo attempts yet1s128 MBJudgeable
Unreliable MessengersGiven a sequence of reversible string transformations and the final message, undo each transformation in reverse order to recover the original message.Easy3StringSimulation+1No attempts yet1s128 MBJudgeable
My Brother's DiaryFind the Caesar shift whose most frequent ciphertext letter maps to E, print the smallest valid shift and the decrypted text, or NOT POSSIBLE if several shifts work.Easy3StringImplementation+2No attempts yet1s128 MBJudgeable
CIVIC DILL MIXRead groups of valid Roman numerals, add each group, and print the sum and case number back in standard Roman form.Easy3StringMath+1No attempts yet1s128 MBJudgeable
WordsRead lines until a line with a single #, and output each line with the characters of every word reversed, keeping spaces fixed.Easy3StringImplementationNo attempts yet1s128 MBJudgeable
Memorable Phone NumbersNormalize each listed phone number to seven digits and report those appearing more than once, sorted, with their counts.Easy3StringHash map+2No attempts yet1s128 MBJudgeable