結果
| 問題 |
No.51 やる気の問題
|
| コンテスト | |
| ユーザー |
kichirb3
|
| 提出日時 | 2018-03-06 09:41:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 442 bytes |
| コンパイル時間 | 951 ms |
| コンパイル使用メモリ | 70,712 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-15 08:05:23 |
| 合計ジャッジ時間 | 2,742 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 RE * 6 |
ソースコード
// No.51 やる気の問題
// https://yukicoder.me/problems/no/51
//
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int solve(int W, int D);
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
int W, D;
cin >> W >> D;
int ans = solve(W, D);
cout << ans << endl;
}
int solve(int W, int D) {
for (; D > 1; --D) {
W -= W / (D*D);
}
return W;
}
kichirb3