SumOn
Practice
4.8 (4 votes)
Easy
Problem
81% Success 641 Attempts 20 Points 2s Time Limit 256MB Memory 1024 KB Max Code

Welcome to planet Xenon. The residents of planet X know each other by their unique identity number.This number is called Xenon number. The Xenon number identifies the characteristics of the person on planet Xenon. Let's say that the Xenon number is N , then:- Friendly nature = Sum of even digits in N. Evil nature = Sum of Odd digits in N.

Monk is new to planet Xenon , as he has recently shifted there and he's in search of a roommate. Help him find his ideal roommate.

You are given the Xenon number of few residents of the planet Xenon. You need to find out whether the particular person has a friendly or evil nature.

INPUT The first line will consist of an integer T denoting the number Xenon numbers you have. The following T lines will contain an integer N denoting the Xenon number of the i th resident.

OUTPUT

  • Print "friendly" without quotes if : ( Sum of even digits > Sum of odd digits ).
  • Print "evil" without quotes if : ( Sum of odd digits > Sum of even digits )

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
7 votes
Tags:
MathematicsOpenApprovedEasyMathamatics
Points:20
3 votes
Tags:
Basic MathNumber theoryAlgorithmsMath
Points:20
6 votes
Tags:
ImplementationBasic ProgrammingAd-HocEasyMathematicsOpenApprovedMathamatics
Editorial

No editorial available for this problem.