题目描述
代码:
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cstring>
#include <string>
#include <algorithm>
#include <vector>
#include <deque>
#include <list>
#include <utility>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <bitset>
#include <iterator>
using namespace std;
typedef long long ll;
const int inf = 0x3f3f3f3f;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1.0);
const double E = exp(1.0);
const int MOD = 1e9+7;
const int MAX = 1e3+5;
char a[MAX];
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
for(int i = 0; i < 1000; i++)
{
cin >> a[i];
}
ll max_num = -INF;
ll tmp;
for(int i = 12; i < 1000; i++)
{
tmp = 1;
for(int j = i; j >= i - 12; j--)
{
tmp *= (a[j] - '0');
}
if(tmp > max_num)
{
max_num = tmp;
}
}
cout << max_num << endl;
return 0;
}