Even Or Odd

Easy
3 views 25 Jan 2026
Given an integer n, print EVEN or ODD....

Absolute Value

Easy
3 views 25 Jan 2026
Given an integer n, print its absolute value....

Sign Of Number

Easy
2 views 25 Jan 2026
Print NEGATIVE, ZERO, or POSITIVE for an integer n....

Last Digit

Easy
3 views 25 Jan 2026
Print the last digit of an integer n (as a non-negative digit)....

Divisible By 3

Easy
4 views 25 Jan 2026
Check if a number is divisible by 3 and print YES/NO....

Divisible By 9

Easy
3 views 25 Jan 2026
Check if a number is divisible by 9 and print YES/NO....

Divisible By 11

Medium
3 views 25 Jan 2026
Check divisibility by 11 using digit positions rule....

Divisible By 4 From Last Two Digits

Medium
2 views 25 Jan 2026
Given a decimal string s, decide if it represents a number divisible by 4....

Divisible By 8 From Last Three Digits

Medium
5 views 25 Jan 2026
Given a decimal string s, decide if it represents a number divisible by 8....

Divisible By 25

Easy
3 views 25 Jan 2026
Given integer n, print YES if divisible by 25....

Compare Fractions a/b and c/d

Hard
4 views 25 Jan 2026
Compare two fractions without floating point. Print , or =....

Floor And Ceil Division

Hard
5 views 25 Jan 2026
Given integers a and b>0, print floor(a/b) and ceil(a/b)....

Remainder Always Positive

Medium
4 views 25 Jan 2026
Given integers a and m>0, print a mod m in range [0,m-1]....

Round To Nearest Multiple

Hard
3 views 25 Jan 2026
Given n and k>0, round n to nearest multiple of k (ties go up)....

Count Multiples In Range

Medium
4 views 25 Jan 2026
Given L R k, count integers in [L,R] divisible by k....

Smallest Multiple >= N

Easy
5 views 25 Jan 2026
Given n and k>0, print the smallest multiple of k that is >= n....

Largest Multiple <= N

Easy
5 views 25 Jan 2026
Given n and k>0, print the largest multiple of k that is ...

Check Power Of Two

Medium
4 views 25 Jan 2026
Given n, print YES if it is a power of 2....

Nearest Power Of Two

Medium
4 views 25 Jan 2026
Given n>0, print the smallest power of 2 that is >= n....

Binary Length

Easy
4 views 25 Jan 2026
Given n>0, print how many bits are needed to write n in binary....

Digit Sum Mod 9

Medium
6 views 25 Jan 2026
Given a big number as string, print its digit sum modulo 9....

Digital Root

Medium
4 views 25 Jan 2026
Given a non-negative integer n (as string), print its digital root (0-9)....

Check Divisible By 6

Easy
2 views 25 Jan 2026
Given integer n, print YES if divisible by 6....

Check Divisible By 12

Medium
5 views 25 Jan 2026
Given integer n, print YES if divisible by 12....

Minimum Steps To Make Divisible

Medium
6 views 25 Jan 2026
Given n and k, find the smallest non-negative x so (n+x) divisible by k....

Reduce Ratio

Medium
4 views 25 Jan 2026
Given a and b, print the reduced ratio a:b....

Count Divisors Naive

Medium
5 views 25 Jan 2026
Given n...

Sum Of Divisors Naive

Hard
3 views 25 Jan 2026
Given n...

Perfect Number Check

Hard
9 views 25 Jan 2026
Check if n is a perfect number (sum of proper divisors equals n)....

Leap Year Simple

Easy
5 views 25 Jan 2026
Given year y, print YES if it is a leap year....