시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 649 187 166 34.511%

문제

2와 5로 나누어 떨어지지 않는 정수 n(1 ≤ n ≤ 10000)가 주어졌을 때, 1로만 이루어진 n의 배수를 찾는 프로그램을 작성하시오.

입력

입력을 여러 개의 테스트 케이스로 이루어져 있다. 각 테스트 케이스는 한 줄로 이루어져 있고, n이 주어진다.

출력

1로 이루어진 n의 배수 중 가장 작은 수의 자리수를 출력한다.

예제 입력 1

3
7
9901

예제 출력 1

3
6
12
W3sicHJvYmxlbV9pZCI6IjQzNzUiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiIxIiwiZGVzY3JpcHRpb24iOiI8cD4yXHVjNjQwIDVcdWI4NWMgXHViMDk4XHViMjA0XHVjNWI0IFx1YjVhOFx1YzViNFx1YzljMFx1YzljMCBcdWM1NGFcdWIyOTQgXHVjODE1XHVjMjE4IG4oMSZuYnNwOyZsZTsgbiAmbGU7IDEwMDAwKVx1YWMwMCBcdWM4ZmNcdWM1YjRcdWM4NGNcdWM3NDQgXHViNTRjLCAxXHViODVjXHViOWNjIFx1Yzc3NFx1YjhlOFx1YzViNFx1YzljNCBuXHVjNzU4IFx1YmMzMFx1YzIxOFx1Yjk3YyBcdWNjM2VcdWIyOTQgXHVkNTA0XHViODVjXHVhZGY4XHViN2E4XHVjNzQ0IFx1Yzc5MVx1YzEzMVx1ZDU1OFx1YzJkY1x1YzYyNC48XC9wPlxyXG4iLCJpbnB1dCI6IjxwPlx1Yzc4NVx1YjgyNVx1Yzc0NCBcdWM1ZWNcdWI3ZWMgXHVhYzFjXHVjNzU4IFx1ZDE0Y1x1YzJhNFx1ZDJiOCBcdWNmMDBcdWM3NzRcdWMyYTRcdWI4NWMgXHVjNzc0XHViOGU4XHVjNWI0XHVjODM4IFx1Yzc4OFx1YjJlNC4gXHVhYzAxIFx1ZDE0Y1x1YzJhNFx1ZDJiOCBcdWNmMDBcdWM3NzRcdWMyYTRcdWIyOTQgXH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YXJlIGluIHRoZSBzbWFsbGVzdCBzdWNoIGEgbXVsdGlwbGUgb2Ygbj88XC9wPlxyXG5cclxuPHA+PGltZyBhbHQ9XCJcIiBzcmM9XCJcL3VwbG9hZFwvaW1hZ2VzXC90aHJlZS5naWZcIiBzdHlsZT1cImhlaWdodDoxNDlweDsgd2lkdGg6MzQ0cHhcIiBcLz48XC9wPlxyXG4iLCJpbnB1dCI6IiIsIm91dHB1dCI6IiIsImhpbnQiOiIiLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1YzYwMVx1YzViNCJ9XQ==

출처

Contest > Waterloo's local Programming Contests > 2 June, 2001 E번

  • 문제를 번역한 사람: baekjoon
  • 데이터를 추가한 사람: joonas
  • 문제의 오타를 찾은 사람: waylight3