#include <iostream>
template< typename... Args>
auto sum(Args... args)
{
return (args + ...);
}
int main()
{
long lsum = sum(1, 2, 3, 4, 5);
std::string s1 = "He", s2 = "llo ", s3 = "Wor", s4 = "ld";
std::string ssum = sum(s1, s2, s3, s4);
std::cout << lsum << std::endl << ssum << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGU8IHR5cGVuYW1lLi4uIEFyZ3M+CmF1dG8gc3VtKEFyZ3MuLi4gYXJncykKewogIHJldHVybiAoYXJncyArIC4uLik7Cn0KCmludCBtYWluKCkKewogIGxvbmcgbHN1bSA9IHN1bSgxLCAyLCAzLCA0LCA1KTsKCiAgc3RkOjpzdHJpbmcgczEgPSAiSGUiLCBzMiA9ICJsbG8gIiwgczMgPSAiV29yIiwgczQgPSAibGQiOwogIHN0ZDo6c3RyaW5nIHNzdW0gPSBzdW0oczEsIHMyLCBzMywgczQpOwoKICBzdGQ6OmNvdXQgPDwgbHN1bSA8PCBzdGQ6OmVuZGwgPDwgc3N1bSA8PCBzdGQ6OmVuZGw7CiAgcmV0dXJuIDA7Cn0K