結果
| 問題 | No.51 やる気の問題 |
| コンテスト | |
| ユーザー |
hotpepsi
|
| 提出日時 | 2015-07-01 22:32:42 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 302 bytes |
| コンパイル時間 | 535 ms |
| コンパイル使用メモリ | 62,896 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-07 21:47:59 |
| 合計ジャッジ時間 | 1,338 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <iostream>
#include <algorithm>
#include <sstream>
#include <cmath>
using namespace std;
int main(int argc, char *argv[])
{
int W, D;
cin >> W >> D;
for (int d = D; d >= 2; --d) {
double dd = (double)d * d;
int w = floor((double)W / dd);
W -= w;
}
cout << W << endl;
return 0;
}
hotpepsi