Skip to content

Instantly share code, notes, and snippets.

@pyoneerC
pyoneerC / CT1M String Generator.cpp
Created July 31, 2023 23:28
CT1M String Generator
#include <iostream>
#include <string>
#include <limits>
std::string getPalindromeSum(int num) {
if (1 == num) {
return "0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "
+ std::to_string(num) +
" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0";
} else if ((num >= 2) && (num <= 10)) {