|
|
back to boardwhy wrong on #T5 Posted by Bu1bu1 13 Mar 2021 01:25 #include<iostream> //#include<string> using namespace std; int main() { int n; string s; cin>>n; cin>>s; int sum=n; int len = s.size(); //cout<<len<<endl; int i =1; while((n-i*len)>1) { sum*=(n-i*len); i++; } if(n%len!=0) cout<<(sum*(n%len))<<endl; else cout<<sum*len<<endl; return 0; } |
|
|