Submission #00164


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <algorithm>
#include <cmath>
#include <ios>
#include <ctype.h>
#include <stack>
#include <istream>
#include <stdio.h>
#include <map>
#include <set>
#include <queue>
#include <unordered_map>
#include <functional>
#include <bitset>
#include <list>
#include <deque>
#include <time.h>
#include <random>
#include <iomanip>
#include <fstream>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define REP(i,a,b) for (int i = a; i < (b); ++i)
#define RREP(i,a,b) for (int i = a; i > (b); --i)
#define all(x) (x).begin(),(x).end()
#define YY cout << "Yes" << endl
#define NN cout << "No" << endl
const long long INF = 1000000007;
typedef long long ll;
using namespace std;
using Graph = vector<vector<int>>;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
ll lcm(ll a, ll b) { return (a * b) / gcd(a,b); }
int solve(){
int nn,n,m,d;
cin>>nn>>m>>d;
n = nn;
rep(i,d){
n = max(n - m,0);
}
cout<<nn -n<<endl;
return 0;
}
int main(){
ios::sync_with_stdio(false);cin.tie(nullptr);
// cout << fixed;cout << setprecision(16);
solve();
return 0;
}

ステータス

項目 データ
問題 0001 - Eating NAMEKUZI
ユーザー名 Namu3
投稿日時 2020-03-02 21:21:26
言語 C++14
状態 Accepted
得点 100
ソースコード長 1377 Byte
最大実行時間 31 ms
最大メモリ使用量 704 KB

セット

セット 得点 Cases
1 ALL 100 / 100 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.txt AC 26 ms 472 KB
1
in02.txt AC 15 ms 428 KB
1
in03.txt AC 22 ms 376 KB
1
in04.txt AC 20 ms 460 KB
1
in05.txt AC 18 ms 416 KB
1
in06.txt AC 28 ms 496 KB
1
in07.txt AC 23 ms 584 KB
1
in08.txt AC 18 ms 664 KB
1
in09.txt AC 26 ms 624 KB
1
in10.txt AC 20 ms 704 KB
1
in11.txt AC 28 ms 656 KB
1
in12.txt AC 15 ms 612 KB
1
in13.txt AC 22 ms 568 KB
1
in14.txt AC 31 ms 652 KB
1
in15.txt AC 17 ms 604 KB
1
in16.txt AC 29 ms 560 KB
1
sample01.txt AC 19 ms 516 KB
1
sample02.txt AC 20 ms 600 KB
1