Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 2 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 16 Sep 2017 My Price 6.00

digits of her mobile number

Problem Description

 

Swapanti was born on the 9th of October, '95. Coincidentally, her best friend was also born on the same day. As a result, she has started liking 9's and 5's a lot. She tries to include it in everything she does. Her email-id has those 2 numbers. Even all the digits of her mobile number are either 9 of 5. She gets her roll number changed if the digits are anything other than 9 and 5. Clearly, she is obsessed with 9's and 5's. Given any number N, she wants to find her next smallest favourite number M greater than N. She is also a bit lazy. Help her in finding M.

 

Input

 

First line of the input will consist of T, the number of test cases. Each of the next T lines contains a single number N.

 

Output

 

For each test case print Swapanti's next favourite number M, in a new line.

 

Constraints

 

  • 1 = T = 1000
  • 1 = N = 1099

 

Example

Input: 4 8 58 240 69 Output: 9 59 555 95

Answers

(5)
Status NEW Posted 16 Sep 2017 01:09 PM My Price 6.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)