結果

問題 No.51 やる気の問題
ユーザー legosuke
提出日時 2017-11-15 08:55:25
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 226 bytes
コンパイル時間 1,477 ms
コンパイル使用メモリ 158,784 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-25 03:46:57
合計ジャッジ時間 2,044 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

int main(void) {
  ll w, d;
  cin >> w >> d;

  ll ans;
  while (d) {
    ans = w / (d * d);
    w -= ans;
    d--;
  }
  cout << ans <<endl;

  return 0;
}
0