Submit | All submissions | Best solutions | Back to list |
S1P4 - Celebration |
Its new years eve Demitry and Raul are celebrating together at Raul's. An equation popped up in Raul's head by which he [A]
can measure if Demitry is enjoying the night. Raul claims that the equation is accurate and wants your help in determining
if Demitry had fun with the celebration or not. Dimetry will give you a floating point number n take the integer part of it
(let this x) and multiply it by 7 and let this A. Demitry will give you another number k (integer this time) and let B is the
square of k . if x+1 and A+B are even numbers then you can say that demitry was happy celebrating with Raul.
Its new year's eve Demitry and Raul are celebrating together at Raul's. An equation popped up in Raul's head by which he can measure if Demitry is enjoying the night. Raul claims that the equation is accurate and wants your help in determining if Demitry had fun with the celebration or not. Dimetry will give you a floating point number n take the integer part of it (let this x) and multiply it by 7 and let this A. Demitry will give you another number k (integer this time) and let B is the square of k .if x+1 was even and A+B was less than or equal to 100 then you can say that demitry was happy celebrating with Raul.
Input
n Floating point number
K >=0 Integer
Output
One line with 1 if Dimetry was happy 0 otherwise
Example
Input: 15.6 5
Output: 0
Hint: A = 105 B=25
Input:
12.1 3
Output:
0
Added by: | mohamed gamal |
Date: | 2012-01-27 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | ASM32-GCC MAWK BC C-CLANG NCSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG COBOL COFFEE D-CLANG D-DMD DART ELIXIR FANTOM FORTH GOSU GRV JS-MONKEY JULIA KTLN NIM NODEJS OBJC OBJC-CLANG OCT PICO PROLOG PYPY PYPY3 PY_NBC R RACKET RUST CHICKEN SQLITE SWIFT UNLAMBDA VB.NET |