mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-09 16:38:47 +00:00
T216907 报告赋分
R65374705
This commit is contained in:
parent
5d64a8b1b5
commit
be4f5d7017
23
Luogu/T216907/T216907.cpp
Normal file
23
Luogu/T216907/T216907.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
using std::cin;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
int t, a, p;
|
||||
|
||||
int main() {
|
||||
cin >> t;
|
||||
while (t--) {
|
||||
cin >> a >> p;
|
||||
if (p < 16) {
|
||||
cout << std::max(0, a - 10) << endl;
|
||||
} else if (p > 20) {
|
||||
cout << std::max(0, a - p + 20) << endl;
|
||||
} else {
|
||||
cout << a << endl;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user