Codeforces 1335B - Construct the String Solution
- Solution in C++:
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n,a,b,t,i;
- char c;
- while(cin>>t)
- {
- while(t--)
- {
- cin>>n>>a>>b;
- for(i=0; i<n; i++)
- {
- cout<<char('a'+i%b);
- }
- cout<<endl;
- }
- }
- }
No comments