From 496bfdadc8fde7e367e398a94954a63f8e03594e Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Thu, 6 Aug 2020 01:55:51 +0800 Subject: [PATCH] =?UTF-8?q?P1161=20=E5=BC=80=E7=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R36448353 --- problem/P1161/P1161.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 problem/P1161/P1161.cpp diff --git a/problem/P1161/P1161.cpp b/problem/P1161/P1161.cpp new file mode 100644 index 00000000..323331df --- /dev/null +++ b/problem/P1161/P1161.cpp @@ -0,0 +1,21 @@ +// R36448353 + +#include + +using namespace std; + +int main() { + int n, t, ans; + n = t = ans = 0; + double a; + n = t = ans = 0; + cin >> n; + for(int i = 1 ; i <= n ; i++) { + cin >> a >> t; + for(int j = 1 ; j <= t ; j++) { + ans ^= int(j*a); + } + } + cout << ans << endl; + return 0; +} \ No newline at end of file