結果

問題 No.51 やる気の問題
ユーザー Ichimiya
提出日時 2020-08-02 02:12:38
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 271 bytes
コンパイル時間 1,828 ms
コンパイル使用メモリ 166,064 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-16 01:34:44
合計ジャッジ時間 2,205 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define PI 3.14159265359
#define NIL -1
using namespace std;
const int64_t MOD = 1e9 + 7;

int main() {
	int64_t W, D;
	cin >> W >> D;

	int ans = -1;
	while (W) {
		int64_t n = W / (D * D);
		ans = n;
		W -= n;
		D--;
	}

	cout << ans << endl;
}
0