Submission #00117


ソースコード

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
#include<bits/stdc++.h>
using namespace std;
using vecint = vector<int>;
using vec2int = vector<vector<int>>;
using vecstr = vector<string>;
using vecll = vector<long long>;
using vec2ll = vector<vector<long long>>;
#define ll long long
#define ull unsigned long long
#define rin(a) for(auto& b : a) cin >> b
#define so(a) stable_sort(a.begin(),a.end())
#define sor(a) stable_sort(a.begin(),a.end(),greater<int>())
#define show(a) for(auto& b : a) cout << b ; cout << endl
#define NOFIND string::npos
#define INF 1e18
main(){
int m , f , b;
cin >> m >> f >> b;
if(m < b){
if(m+f<b) cout << "NA" << endl;
else cout << b-m << endl;
}else{
cout << 0 << endl;
}
return(0);
}

ステータス

項目 データ
問題 0002 - 買い物
ユーザー名 ei2222
投稿日時 2023-07-31 11:11:58
言語 C++17
状態 Accepted
得点 4
ソースコード長 745 Byte
最大実行時間 24 ms
最大メモリ使用量 704 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in1.txt AC 18 ms 604 KB
1
in2.txt AC 18 ms 504 KB
1
in3.txt AC 19 ms 468 KB
1
in4.txt AC 16 ms 436 KB
1
in5.txt AC 22 ms 540 KB
1
in6.txt AC 24 ms 632 KB
1
in7.txt AC 23 ms 476 KB
1
in8.txt AC 20 ms 576 KB
1
in9.txt AC 18 ms 672 KB
1
in10.txt AC 23 ms 704 KB
1
in11.txt AC 17 ms 548 KB
1
in12.txt AC 24 ms 648 KB
1
in13.txt AC 21 ms 620 KB
1
in14.txt AC 17 ms 460 KB
1
in15.txt AC 19 ms 560 KB
1
in16.txt AC 20 ms 528 KB
1