Codechef Problems: Missing Shoes (SHOM)
Problem Statement: Chef owns several pairs of shoes, unfortunately he has so many that he lost track of them! Each pair of shoes consists of one left shoe and one right shoe. Looking at his collection, Chef counts L L left shoes and R R right shoes. What's the minimum number of shoes Chef is missing? Input Format The only line of input will contain two space-separated integers L L and R R – the number of left shoes and right shoes, respectively. Output Format Output a single integer: the minimum number of shoes Chef is missing. Constraints 1 ≤ L , R ≤ 10 1 ≤ L , R ≤ 10 Solution: Given, L : Number of Left Shoes R : Number of Right Shoes To find: Minimum number of shoes Chef is missing Problem background: A Shoe pair has 1 left shoe and 1 right shoe, Here we assume that we will not count the number of shoes which were missing in pairs (i.e., both left and right shoes are m...