class Solution {
public:intaddDigits(int num){while(num >=10){int tot =0;for(; num >0; num /=10)
tot += num %10;
num = tot;}return num;}};
class Solution {
public:
vector<int>singleNumber(vector<int>& nums){int s =0;for(auto x : nums) s ^= x;int k =0;while(!(s >> k &1)) k ++;int s1 =0, s2 =0;for(auto x : nums){if(x >> k &1)
s1 ^= x;else
s2 ^= x;}return vector<int>{s1, s2};}};