結果

問題 No.51 やる気の問題
ユーザー Zetubou_senseZetubou_sense
提出日時 2018-03-18 04:26:53
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 210 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 58,332 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 19:54:50
合計ジャッジ時間 1,459 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<math.h>
using namespace std;

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

  int i;
  for(i=d;i>1;i--){
    w -= (int)(w / pow((double)i, 2) );
  }

  cout << w << endl;

  return 0;
}
0