結果

問題 No.51 やる気の問題
ユーザー omu
提出日時 2015-11-23 14:06:40
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
RE  
実行時間 -
コード長 367 bytes
コンパイル時間 624 ms
コンパイル使用メモリ 64,872 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-13 17:15:27
合計ジャッジ時間 2,252 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <vector>
#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <map>

using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;

int main(){
	int w,d;
	cin >> w >> d;
	int ans = 0;
	for(int t = d;t >= 1;t--){
		if(t == 1)ans = w / (t * t);
		w -= w / (t * t);
	}	
	cout << ans << endl;
	return 0;
}
0