結果

問題 No.51 やる気の問題
ユーザー kiyunetsubamna
提出日時 2015-05-18 23:23:55
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 488 ms
コンパイル使用メモリ 58,080 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-06 05:31:15
合計ジャッジ時間 1,267 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
	double w;
	int d;
	int a;
	cin >> w;
	cin >> d;
	for (int i = 0; i < (d - 1); i++){
		a = w / ((d - i)*(d - i));
		w = w - a;
	}
	cout << w << endl;



	return 0;
}
0