Você está na página 1de 4

# CLOCK ANGLES

The angle between the hour and minute hands of an analog clock is always between 0 and 180 degrees, inclusive. For example, at 12:00 the angle between the hands is 0 degrees. In this problem you are to find the angle between the hands of a clock for an arbitary time 12:00 and 11:59. INPUT The input data will contain multiple test cases. Each test case will consist of 2 numbers. The first number specifies the hour, and will be greater than 0 and less than or equal to 12. The second number specifies the number of minutes and ill be in the range 0 to 59. two numbers, each of which is 0 , will follow the last test case. Output For each test case, display the time in the usual form and the smallest angle formed by hands, accurate to one fractional digit. The output should be similar to that shown in the sample below. Sample Input 12 0 12 30 60 30 Expected output At 12:00 the angle is 0.0 degrees. At 12:30 the angle is 165.0 degrees. At 6:00 the angle is 180.0 degrees At 3:00 the angle is 90.0 degrees.

PALLINDROME REVERSED!

COLOUR BOMBARD!

The RGB colour is a colour code where each colour (Red Green Blue) has a value from 0 to 255 , Given a question where we can target a given canvas and allow an area of effect to formed . Say the canvas is your Array and we will give the coordinates of bombarding ! Say your canvas is w w w w w w w w w w wwwwwwwwww wwwwwwwwww wwwwwwwwww wwwwwwwwww wwwwwwwwww wwwwwwwwww wwwwwwwwww wwwwwwwwww w w w w w w w w w w a 10x10 Canvas. WORKING RULE At the Given Coordinates mention the Dominant colours Value , and as we move away the colour should decrease by 50% , say the code was 254 for Red , the adjacent squares will have 254/2= 127(decimal part to be ignored) as the colour code, and so on till the value is below 10 then the colour is set to 0. Note Boundary Conditions Apply, The canvas is considered to be round and if the coordinates are on the edge then make sure the effect applies on the opposite part also ! INPUT The Input will be the X-Y Coordinates of the colour attack and the Colour code(in decimal) Output Output will be a canvas indicating the area of effect Sample Input 55 254 127 10

Expected output 15 15 15 15 15 15 15 15 15 0

15 15 15 15 15 15 15 15 0

31 31 31 31 31 31 31 15 0

31 63 63 63 63 63 31 15 0

## 31 31 31 63 63 63 127 127 127 127 254 127 127 127 127 63 63 63 31 31 31 15 15 15 0 0 0

31 63 63 63 63 63 31 15 0

31 31 31 31 31 31 31 15 0

15 15 15 15 15 15 15 15 0

0 0 0 0 0 0 0 0 0