結果
| 問題 |
No.51 やる気の問題
|
| コンテスト | |
| ユーザー |
Yut176
|
| 提出日時 | 2016-09-05 16:07:22 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 5,000 ms |
| コード長 | 385 bytes |
| コンパイル時間 | 801 ms |
| コンパイル使用メモリ | 64,476 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-15 20:28:10 |
| 合計ジャッジ時間 | 1,741 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<stdlib.h>
#include<vector>
#include<string>
#include<sstream>
#include<math.h>
using namespace std;
int main(){
long long int w, d;
cin >> w;
cin >> d;
long long int ans = w;
long long int tmp = d;
for(int i=0; i<d-1; i++){
ans -= ans/(tmp*tmp);
tmp--;
}
cout << ans << endl;
return 0;
}
Yut176