Submit solution
Points:
0.20 (partial)
Time limit:
1.0s
Memory limit:
512M
Problem type
Allowed languages
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
In case the statement didn't load correctly, you can download the statement here: Statement
Lưu ý: các bạn không nhập, xuất dữ liệu bằng file kể cả khi đề bài có yêu cầu. Đọc, ghi dữ liệu được thực hiện ở stdin và stdout.
Comments
include <iostream>
using namespace std;
int main() { freopen("OTT.INP", "r", stdin); // address của file source freopen("OTT.OUT", "w", stdout); char a,b; cin>>a>>b; if(a=='S'){ if(b=='S') cout<<"D"; else if(b=='R') cout<<"B"; else if(b=='P') cout<<"A"; } if(a=='R'){ if(b=='S') cout<<"A"; else if(b=='R') cout<<"D"; else if(b=='P') cout<<"B"; } if(a=='P'){ if(b=='S') cout<<"B"; else if(b=='R') cout<<"A"; else if(b=='P') cout<<"D"; } }