From a0d7b8320a8996eee0ed957b79c3a882f8b47146 Mon Sep 17 00:00:00 2001 From: Omar Magdy Date: Sat, 30 Apr 2022 01:13:40 +0200 Subject: Added all current problems --- LonelyInteger.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 LonelyInteger.cpp (limited to 'LonelyInteger.cpp') diff --git a/LonelyInteger.cpp b/LonelyInteger.cpp new file mode 100644 index 0000000..a5ce4a4 --- /dev/null +++ b/LonelyInteger.cpp @@ -0,0 +1,12 @@ +#include +using namespace std; +int main(){ + int n, x = 0, k; + cin >> n; + for(int i = 0; i < n; i++){ + cin >> k; + x ^= k; + } + cout << x; + return 0; +} -- cgit v1.2.3