diff --git a/02xxx/02975.cpp b/02xxx/02975.cpp new file mode 100644 index 00000000..2ab51ca5 --- /dev/null +++ b/02xxx/02975.cpp @@ -0,0 +1,19 @@ +#include +#include +using namespace std; + +bool solve(void) { + int a, b; char c; cin >> a >> c >> b; + if (a == 0 && b == 0 && c == 'W') return false; + + cout << (c == 'D' ? to_string(a+b) : (a + 200 < b ? "Not allowed" : to_string(a-b))) << "\n"; + return true; +} + +int main(void) { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + while (solve()); + return 0; +} \ No newline at end of file