Skip to content

Commit 15f791a

Browse files
authored
Create 770A. New Password solution2.cpp
1 parent 8b74cac commit 15f791a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

770A. New Password solution2.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
problem name:770A. New Password
3+
version : solution2
4+
problem link: https://codeforces.com/contest/770/problem/A
5+
staus:accepted
6+
author:mohand sakr
7+
8+
*/
9+
10+
#include <iostream>
11+
#include<string>
12+
using namespace std;
13+
14+
int main() {
15+
16+
string s="abcdefghijklmnopqrstuvwxyz";
17+
string s2="";
18+
int n,k;
19+
cin>>n>>k;
20+
for(int i=0;i<n;i++){
21+
s2+=s[i%k];
22+
}
23+
24+
cout<<s2<<endl;
25+
26+
27+
28+
29+
30+
31+
return 0;
32+
}

0 commit comments

Comments
 (0)