SRM482 Div2 Medium(500) LockersDivTwo
Div1より問題サイズが小さくなっている。
class LockersDivTwo{public: int lastOpened( int N ) { int ans = 1; for ( int n=0; ; n++ ) { int x=1; for ( int t=n; t>=1; t-- ) x = (x+t-1)/t*t; if ( x > N ) break; ans = x; } return ans; }};