結果

問題 No.51 やる気の問題
ユーザー toshiro_yanagi
提出日時 2019-01-11 16:25:37
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 184 bytes
コンパイル時間 563 ms
コンパイル使用メモリ 64,440 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-28 21:14:06
合計ジャッジ時間 1,578 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
typedef long long lint;

int main()
{
	lint w, d;
	cin >> w >> d;
	for (lint i = d; i > 1; i--)
	{
		w -= w / (i * i);
	}
	cout << w << endl;
}
0