結果

問題 No.51 やる気の問題
コンテスト
ユーザー omu
提出日時 2015-11-23 14:06:40
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
RE  
実行時間 -
コード長 367 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 388 ms
コンパイル使用メモリ 85,632 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-04 06:37:53
合計ジャッジ時間 1,629 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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