#B. 书香阁座位

    Type: Default 1000ms 256MiB

书香阁座位

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

说明

Battle小学的书香阁有nn个座位,已知第一排有kk个座位,以后每排比上一排增加22个座位,最后一排有几个座位?一共有几排?
试编一程序算一算。

输入格式

一行两个整数n,k(1k100,kn1071\leq k \leq100, k\le n \le 10^{7} )。

输出格式

第一行,输出最后一排的座位数。
第二行,输出排数。
312 15
37
12

卓越班-Day0作业Ⅰ枚举

Not Claimed
Status
Done
Problem
6
Open Since
2024-7-21 18:00
Deadline
2024-7-30 23:59
Extension
24 hour(s)