結果

問題 No.51 やる気の問題
ユーザー siguma323
提出日時 2016-05-08 19:20:59
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 494 bytes
コンパイル時間 853 ms
コンパイル使用メモリ 82,100 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-05 10:50:08
合計ジャッジ時間 1,586 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <vector>
#include <string>
#include <algorithm>
#include <numeric>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <iterator>
#include <cmath>
#include <iomanip>
using namespace std;

using ull = unsigned long long;
using ll = long long;

int main()
{
    ull w,d;
    cin >> w >> d;


    for(ull i = d; i > 1; --i)
    {
        w -= floor(w/(i*i));
    }

    cout << w << endl;
}
0