Swap Two Numbers (No Temp)

Easy
4 views 25 Jan 2026
Two integers a and b are given. Swap them without using a third variable and print the result....

Sum 1 to N

Easy
5 views 25 Jan 2026
Given n, print the sum 1+2+...+n....

Celsius to Fahrenheit

Easy
4 views 25 Jan 2026
Input is a temperature in Celsius. Print Fahrenheit with 2 decimals....

Running Counter

Easy
4 views 25 Jan 2026
You are given n and then n integers. Start total=0. Add each value and print final total....

Simple Interest

Easy
6 views 25 Jan 2026
Given p r t, print simple interest (p*r*t/100) with 2 decimals....

SET/GET One Variable

Medium
4 views 25 Jan 2026
You will get q commands: SET x, GET. Keep a single variable (starts EMPTY). GET prints value or EMPTY....

Store Variables by Name

Medium
4 views 25 Jan 2026
Commands: SET name value, GET name. Save values by name. GET prints value or NOT_FOUND....

Plus/Minus Simulator

Medium
4 views 25 Jan 2026
Line1 x. Line2 ops string. '+' means x++, '-' means x--. Print final x....

Parse KEY=VALUE Lines

Medium
4 views 25 Jan 2026
Input has lines like KEY=VALUE. Ignore empty lines and lines starting with #. Print number of keys stored....

Shadowing Counter

Medium
4 views 25 Jan 2026
Commands: LET x, BEGIN, END. Count how many LET shadows a name already present in an outer scope....

Variable Variables

Medium
4 views 25 Jan 2026
Input: name value. Create a variable with that name and print it back....

Running Average

Medium
4 views 25 Jan 2026
Given n numbers, print the running average after each number (2 decimals)....

Reference Chain

Hard
5 views 25 Jan 2026
You get three integers a b c. Set x=a, y=&x, x=b, z=&y, y=c. Print x y z....

Use Before SET

Hard
3 views 25 Jan 2026
Commands: SET name value, PRINT name. Count how many PRINT happen before a name is ever SET....

UNSET Tracker

Hard
4 views 25 Jan 2026
Commands: SET name val, UNSET name, GET name. For GET print value or UNSET....

XOR Swap

Hard
4 views 25 Jan 2026
You get a and b. Swap using XOR trick and print swapped....

Mini Scope Interpreter

Hard
5 views 25 Jan 2026
Commands: BEGIN, END, SET name value, GET name. GET searches inner to outer. Print value or NOT_FOUND....

Template Replace

Hard
5 views 25 Jan 2026
You get n pairs key value, then one text line. Replace {key} with value and print final text....

Static Call Counter

Hard
4 views 25 Jan 2026
Given q lines (CALL), print counter after each call using a static variable inside function....

Merge Two Config Layers

Hard
4 views 25 Jan 2026
You get base key=value lines, then override key=value lines. Overrides replace base. Print final key count....