結果

問題 No.51 やる気の問題
ユーザー kaffelun
提出日時 2018-05-31 23:44:37
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 356 bytes
コンパイル時間 1,381 ms
コンパイル使用メモリ 160,248 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-30 08:44:25
合計ジャッジ時間 2,150 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main() {
    #ifdef DEBUG
    std::ifstream in("/home/share/inputf.in");
    std::cin.rdbuf(in.rdbuf());
    #endif
    double W, D;
    cin >> W >> D;
    int64_t ans = (int64_t)W;
    for(int i = D; i > 1; i--) {
        ans -= floor(double(ans) / (i * i));
    }
    cout << ans << endl;
    return 0;
}
0