Logo
(追記) (追記ここまで)

10509번 - Good morning! 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB20111610457.778%

문제

Good morning! This is your 5am wake-up call! A partly cloudy day is expected with light rain coming afternoon...

You have just woken up. You desperately need coffee... and... more coffee... and some cereal. And your clothes. And coffee.

To prepare warm cereal, you put some milk into a microwave, trying to heat it for k seconds. You must enter k on the microwave keyboard:

As you still haven’t had your coffee, your hand (along with eyes and brain) keeps falling down. You are only able to enter a number if your hand would only move downwards and/or to the right. You cannot go back left, nor move your hand up, though you can press the same key again. And again... and again...

For example, you can enter the number 180 or 49, but not 98 or 132. Enter a number that is as close to k as possible. If there are two solutions, enter any one of them. You are too sleepy to actually care. And you need coffee.

입력

The first line of input contains the number of test cases T. The descriptions of the test cases follow:

Each test case consists of one line containing an integer k (1 ≤ k ≤ 200).

출력

For each test case, output a number that is closest to k which can be entered on the keyboard

제한

예제 입력 1

3
180
83
132

예제 출력 1

180
80
133

힌트

출처

ICPC > Regionals > Europe > Central European Regional Contest > CERC 2014 H번

Contest > Open Cup > 2014/2015 Season > Stage 4: Grand Prix of Europe K번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /