Problem29
/* * \file problem029.cpp * \brief Project Euler - Problem 29 * * \author Takushi Homma (b1006018@fun.ac.jp) * \date 2010/03/01 18:40:13 */ #include <iostream> #include <cmath> #include <set> using namespace std; #define MIN 2 #define MAX 100 int main(int argc, char **argv) { set<double> set_ans; for (double a = MIN; a <= MAX; a++) { for (double b = MIN; b <= MAX; b++) { set_ans.insert(pow(a, b)); } } cout << set_ans.size() << endl; return 0; }