結果

問題 No.51 やる気の問題
ユーザー tenkyu9
提出日時 2018-03-07 09:31:47
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
RE  
実行時間 -
コード長 417 bytes
コンパイル時間 784 ms
コンパイル使用メモリ 80,688 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-25 02:37:43
合計ジャッジ時間 2,415 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<cstring>
#include<map>
#include<vector>
#include<queue>
#include<utility>
using namespace std;
typedef long long int ll;

int main(){

  int w, d, tmp;
  cin >> w >> d;
  int n=d;

  for(int i=0; i<n; i++){
    tmp=w;
    w=w/(d*d);
    d--;
    if(i<n-1){
      w=tmp-w;
    }
  }

  cout << w << endl;

  return 0;
}
0