結果
問題 |
No.51 やる気の問題
|
ユーザー |
|
提出日時 | 2021-01-10 16:58:20 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 5,000 ms |
コード長 | 344 bytes |
コンパイル時間 | 721 ms |
コンパイル使用メモリ | 74,188 KB |
最終ジャッジ日時 | 2025-01-17 15:58:15 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <algorithm> #include <array> #include <cstdio> #include <iostream> #include <numeric> #include <optional> #include <vector> using namespace std; int main() { int64_t w, d; cin >> w >> d; int64_t ans = 0; for (; d > 0; --d) { ans = w / (d * d); w -= ans; } cout << ans << endl; return 0; }