← All problemsSign in

Triangle Measure

Is the triangle the right one? ###Input: A single character $C$ and a number $N$ separated by a space ###Output: Output a single integer ###Constraints $C$ is either ‘s’ or ‘c’, $0 <= N <= 10^7$, $N$ is a multiple of $0.5$. ###Sample Input 1: s 10 ###Sample Output 1: 0 ###Sample Input 2: c 123.5 ###Sample Output2: 0 ###Sample Input 3: s 7315.5 ###Sample Output

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start