leetcode

Solution to some Leetcode problems written in C++
git clone git://git.dimitrijedobrota.com/leetcode.git
Log | Files | Refs | README | LICENSE

2177.cpp (183B)


      1 class Solution {
      2   public:
      3     vector<long long> sumOfThree(long long num) {
      4         if (num % 3) return {};
      5         long long a = num / 3;
      6         return {a - 1, a, a + 1};
      7     }
      8 };