|
|
back to boardcompiler problem #include<bits/stdc++.h> using namespace std; int solve(int n, string k){ int ans=k.size(); if(n>=1){ return n*solve(n-ans); } else{ return 1; } } int main() { int t,n; string k; cin>>n; cin>>k; int result=solve(n,k); cout<<result<<endl; return 0; } |
|
|