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

문제

두 양의 정수가 주어졌을 때, 두 수 사이에 있는 정수를 모두 출력하는 프로그램을 작성하시오.

입력

두 정수 A와 B가 주어진다.

출력

첫째 줄에 두 수 사이에 있는 수의 개수를 출력한다.

둘째 줄에는 두 수 사이에 있는 수를 오름차순으로 출력한다.

서브태스크

번호 배점 제한
1 30

1 ≤ A, B ≤ 1000.

2 70

1 ≤ A, B ≤ 1015, A와 B의 차이는 최대 100,000.

예제 입력 1

8 14

예제 출력 1

5
9 10 11 12 13
W3sicHJvYmxlbV9pZCI6IjEwMDkzIiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVjMjJiXHVjNzkwIiwiZGVzY3JpcHRpb24iOiI8cD5cdWI0NTAgXHVjNTkxXHVjNzU4IFx1YzgxNVx1YzIxOFx1YWMwMCBcdWM4ZmNcdWM1YjRcdWM4NGNcdWM3NDQgXHViNTRjLCBcdWI0NTAgXHVjMjE4IFx1YzBhY1x1Yzc3NFx1YzVkMCBcdWM3ODhcdWIyOTQgXHVjODE1XHVjMjE4XHViOTdjIFx1YmFhOFx1YjQ1MCBcdWNkOWNcdWI4MjVcdWQ1NThcdWIyOTQgXHVkNTA0XHViODVjXHVhZGY4XHViN2E4XHVjNzQ0IFx1Yzc5MVx1YzEzMVx1ZDU1OFx1YzJkY1x1YzYyNC48XC9wPlxyXG4iLCJpbnB1dCI6IjxwPlx1YjQ1MCBcdWM4MTVcdWMyMTggQVx1YzY0MCBCXHVhYzAwIFx1YzhmY1x1YzViNFx1YzljNFx1YjJlNC48XC9wPlxyXG4iLCJvdXRwdXQiOiI8cD5cdWNjYWJcdWM5ZjggXHVjOTA0XHVjNWQwIFx1YjQ1MCBcdWMyMTggXHVjMGFjXHVjNzc0XHVjNWQwIFx1Yzc4OFx1YjI5NCBcdWMyMThcdWM3NTggXHVhYzFjXHVjMjE4XHViOTdjIFx1Y2Q5Y1x1YjgyNVx1Z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zaXN0IG9mIGEgc2luZ2xlIGludGVnZXIgJm1kYXNoOyB0aGUgbnVtYmVyIG9mIGludGVnZXJzIHRoYXQgYXJlIHN0cmljdGx5IGJldHdlZW4gQSBhbmQgQi4gSWYgdGhlcmUgaXMgYXQgbGVhc3Qgb25lIHN1Y2ggaW50ZWdlciwgdGhlbiBhbGwgb2YgdGhlbSBzaG91bGQgYmUgbGlzdGVkIGluIGluY3JlYXNpbmcgb3JkZXIgaW4gdGhlIHNlY29uZCBsaW5lIG9mIG91dHB1dC48XC9wPlxyXG4iLCJoaW50IjoiIiwib3JpZ2luYWwiOiIxIiwiaHRtbF90aXRsZSI6IjAiLCJwcm9ibGVtX2xhbmdfdGNvZGUiOiJFbmdsaXNoIiwic3VidGFzazEiOiI8cD4xICZsZTsgQSwgQiAmbGU7IDEwMDA8c3BhbiBzdHlsZT1cImZvbnQtc2l6ZTogMTAuODMzM3B4O1wiPi48XC9zcGFuPjxcL3A+XHJcbiIsInN1YnRhc2syIjoiPHA+MSAmbGU7IEEsIEIgJmxlOyAxMDxzdXA+MTU8XC9zdXA+LCBBIGFuZCBCIGRpZmZlciBieSBhdCBtb3N0IDEwMCAwMDAuPFwvcD5cclxuIn1d

출처

Olympiad > Baltic Olympiad in Informatics > BOI 2014 P1번

채점 및 기타 정보

  • 예제는 채점하지 않는다.