#include using namespace std; int main() { long work; // 仕事量 long day; // 日数 long cDay; // 繰り返し用にコピー double dNum; // 1日あたりの仕事量 cin >> work; cin >> day; cDay = day; for (int i = 0; i < cDay; ++i) { dNum = (double)work / (day*day); work -= (long)dNum; --day; } cout << (long)dNum; return 0; }