結果

問題 No.51 やる気の問題
ユーザー キョウチク
提出日時 2019-03-11 16:54:16
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
RE  
実行時間 -
コード長 273 bytes
コンパイル時間 395 ms
コンパイル使用メモリ 55,928 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 15:37:48
合計ジャッジ時間 1,802 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
int main() {
	int W, D;
	int power;
	cin >> W >> D;
	int i = D;
	while (i > 1) {
		//cout << "残り" << i << "日" << endl;
		power = W / (i*i);
		W -= power;
		//cout << "やる気" << power << endl;
		i--;
	}
	cout << W << endl;
}
0