#include "raindrops.h" #include namespace raindrops { using namespace std; typedef map dictionary_t; static const dictionary_t dictionary = {{3, "Pling"}, {5, "Plang"}, {7, "Plong"}}; string convert(int input) { string result; for (auto &pair : dictionary) if (!(input % pair.first)) { result += pair.second; } return result.empty() ? to_string(input) : result; } }