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

7497번 - Greatest Product 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB70433763.793%

문제

September 10th is forester day. On this occasion Magic forest dwellers decided to make a party. Kuzma beaver is assigned to take care about intellectual games. Kuzma has invented at his opinion quite interesting game.

Rules of the game are simple. Master announces positive integer N. Player needs to calculate product of digits for each positive integer up to N and report the greatest product.

All answers should be known beforehand to allow interactive communication during a game. This causes problems since N could be relatively big (1N2000000000). Kuzma is not good using computers; he asks you to write a program which having positive integer N will find correct answer.

입력

Each line at input contains integer N.

출력

Corresponding line at output should contain greatest product for this N.

제한

예제 입력 1

1

예제 출력 1

1

예제 입력 2

101090000

예제 출력 2

43046721

예제 입력 3

28994

예제 출력 3

10368

예제 입력 4

4876

예제 출력 4

2268

예제 입력 5

2789

예제 출력 5

1008

힌트

출처

ICPC > Regionals > Europe > Southeastern European Regional Contest > All-Ukrainian Collegiate Programming Contest > AUCPC 2010 G번

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

출처

대학교 대회

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

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