結果

問題 No.51 やる気の問題
ユーザー sawfish
提出日時 2022-12-17 12:49:34
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 240 bytes
コンパイル時間 3,665 ms
コンパイル使用メモリ 118,784 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-16 21:28:45
合計ジャッジ時間 3,536 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;
using LL = long long;

constexpr LL c = 1000000L;

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


    for (LL i = D; i > 1; i--) {
        W -= (W * c) / (i * i) / c;
    }

    cout << W << endl;
}
0