結果
| 問題 | No.51 やる気の問題 |
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2014-10-28 23:34:14 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 59,904 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-04 03:59:24 |
| 合計ジャッジ時間 | 1,280 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | WA * 20 |
ソースコード
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
using namespace std;
//namaega 184
int main(){
long long d,w;
scanf("%lld%lld",&w,&d);//%d%d%d%d",&n,&v,&x,&y,&ax,&ay);
long long ans=0;
while(d){
ans=w/d*d;
if(d==1)break;
w-=ans;
d--;
}
printf("%d\n",ans);
return 0;
}
184