結果

問題 No.51 やる気の問題
ユーザー wightou
提出日時 2025-06-20 03:31:26
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 548 bytes
コンパイル時間 3,377 ms
コンパイル使用メモリ 275,532 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-06-20 03:31:31
合計ジャッジ時間 4,499 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

/////////////////// メイン ///////////////////

int main()
{

  //////////////////// 入力 ////////////////////

  int w, d;
  cin >> w >> d;

  //////////////// 出力変数定義 ////////////////

  // int result = 0;

  //////////////////// 処理 ////////////////////

  while (d > 1) {

    w -= w/(1LL*d*d);
    d--;

  }

  //////////////////// 出力 ////////////////////

  // cout << result << endl;
  cout << w << endl;

  //////////////////// 終了 ////////////////////

  return 0;
}
0