20 Mar 2016

Naughty Sid and SEV

/* Sid is a very naughty, plump and food-loving boy. Today, his mother has made the special snack SEV. She fills this SEV up to a height ‘H’ cm in a transparent cubical closed box of edge ‘a’ cm (Fig 1) . When Sid asks mother...

Categories: , ,

Wobbly Numbers

/* An span class="mjx-chtml MathJax_CHTML" data-mathml="N" id="MathJax-Element-1-Frame" role="presentation" style="font-size: 129%; position: relative;" tabindex="0">N-length wobbly number is of the form "ababababab..." and so on of length span class="mjx-chtml MathJax_CHTML" data-mathml="N" id="MathJax-Element-2-Frame" role="presentation" style="font-size:...

Categories: , ,

Hungry Lemurs

/* //JAVA   There are K lemurs on Madagascar and Kevin has N bananas. He has to give away all his bananas to lemurs. Lemurs are happy if all of them get the same number of bananas (even if they don't get any). In one minute Kevin can do one of the following: Find one banana. Discard one banana (eat). Increase a population of lemurs...

Categories: , ,

17 Mar 2016

Clock angle problem

/* Find minimum angle between hour and minute hand.  Input: The first line contains the number of test cases, T. T lines follow, each of which contains two integer Hour hand H and minute hand M . Output: Print the minimum angle between the hands. Constraints 1<=T<=100 01<=H<=12 01<=M<=59 */  #include...

Categories: , , , ,

Trailing Zeroes

/* Given a number find the number of trailing zeroes in its factorial. Input Format A single integer - N Output Format Print a single integer which is the number of trailing zeroes. Input Constraints 1 <= N <= 1000 */ #include <stdio.h>int main(){         int i,N,z,k;    ...

Categories: , , ,

Copyright © 2025 UPgradeCODING | Powered by Blogger