In some school, lessons start at 9:00. Each lesson lasts 45 minutes. After 1st, 3rd, 5th, etc. lessons there’s a 5-minute break, and after 2nd, 4th, 6th, etc. — a 15-minute break. Determine when the given lesson ends.
A pie in the canteen costs a ruble and b kopecks. Determine how many rubles and kopecks are needed to buy n pies.
You are given two moments of time on the same day: hours, minutes, and seconds. Determine how many seconds passed between them.
A car drives n kilometers per day. How many days are needed to cover a distance of m kilometers?
n students divide k apples as evenly as possible so that the difference is no more than 1. How many students get fewer apples?
A snail climbs a pole of height h meters, going up a meters during the day and slipping b meters at night (a > b). Determine on what day the snail will reach the top.
Determine if a four-digit number is symmetric (i.e., reads the same forward and backward). Pad with leading zeroes if necessary. Output 1 if symmetric, otherwise any other number.
Given two natural numbers n and m. If one is divisible by the other, print 1, otherwise any other number.
Write a program that reads two integers a and b and prints the maximum using only integer arithmetic (+, -, *, //, %, =). Do not use max function or conditionals.