結果

問題 No.51 やる気の問題
ユーザー hryshtk
提出日時 2015-09-03 21:16:50
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
RE  
実行時間 -
コード長 386 bytes
コンパイル時間 1,315 ms
コンパイル使用メモリ 157,412 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-18 21:56:02
合計ジャッジ時間 2,604 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

using namespace std;
#include <bits/stdc++.h>
#define BEGIN ios_base::sync_with_stdio(0);cin.tie(0);
#define END return EXIT_SUCCESS;
#define FOR(I,A,B) for(int (I)=(A);(I)<(B);++(I))
#define ALL(C) (C).begin(),(C).end()
inline void solve()
{
	int W,D;
	cin>>W>>D;
	while(D>1)
	{
		W-=W/(D*D);
		D--;
	}
	cout<<W<<endl;
}
int main(int argc,char**argv)
{
    BEGIN
    solve();
    END
}
0