結果

問題 No.51 やる気の問題
ユーザー eri
提出日時 2015-07-07 06:07:47
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 191 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 58,712 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-08 01:28:01
合計ジャッジ時間 1,067 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cmath>
using namespace std;
int main(void){
	int a = 0, w, d;
	cin >> w >> d;
	while (d){
		w -= a;
		a = w / pow(d, 2);
		d--;
	}
	cout << a << endl;
	return 0;
}
0