結果

問題 No.51 やる気の問題
ユーザー キョウチク
提出日時 2019-03-11 16:45:47
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
RE  
実行時間 -
コード長 268 bytes
コンパイル時間 440 ms
コンパイル使用メモリ 55,344 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 15:37:43
合計ジャッジ時間 1,944 ms
ジャッジサーバーID
(参考情報)
judge4 / 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;
	for (int i = D; i > 1; i--) {
		//cout << "残り" << i << "日" << endl;
		power = W / (i*i);
		W -= power;
		//cout << "やる気" << power << endl;
	}
	cout << W << endl;
}
0