結果
| 問題 | No.415 ぴょん |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-08-26 23:15:33 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 266 bytes |
| 記録 | |
| コンパイル時間 | 1,049 ms |
| コンパイル使用メモリ | 175,024 KB |
| 実行使用メモリ | 7,976 KB |
| 最終ジャッジ日時 | 2026-05-08 15:58:05 |
| 合計ジャッジ時間 | 2,354 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int n,d;
cin>>n>>d;
if(n<=d){
cout<<0<<endl;
return 0;
}
int x=(n-1)/d;
int y=(n-1)%d;
int z=1;
if(d-1>y){
z+=d-1;
}
z*=x;
cout<<z<<endl;
return 0;
}