#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
using namespace std;
#define pf printf
#define sf scanf
typedef long long ll;
int main()
{
int n, len, i;
ll ans=1;
string s;
cin >> n;
cin >> s;
len = s.length();
for(i=n ; i>0 ; i =(i-len))
{
ans = (ans*i);
}
cout << ans << endl;
}
#include<cstdio>
#include<cmath>
#include<cstring>
using namespace std;
#define pf printf
#define sf scanf
typedef long long ll;
int main()
{
int n, len, i;
ll ans=1;
string s;
cin >> n;
cin >> s;
len = s.length();
for(i=n ; i>0 ; i =(i-len))
{
ans = (ans*i);
}
cout << ans << endl;
}
No comments:
Post a Comment