#include using namespace std; #define rep(i,n) for(int i=0;i>w>>d; rep(i,d-1){ w-=(w/((d-i)*(d-i))); } cout<