結果
| 問題 | No.51 やる気の問題 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2024-03-27 16:43:09 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 5,000 ms | 
| コード長 | 267 bytes | 
| コンパイル時間 | 1,750 ms | 
| コンパイル使用メモリ | 192,680 KB | 
| 最終ジャッジ日時 | 2025-02-20 14:02:23 | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 20 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef int64_t lint;
int main()
{
    lint w, d;
    cin >> w >> d;
    lint s;
    for (int i = 1; i < d; i++)
    {
        w -= w / ((d - i + 1) * (d - i + 1));
    }
    cout << w << endl;
    // system("pause");
}
            
            
            
        