Submission #738504

# Submission time Handle Problem Language Result Execution time Memory
738504 2023-05-09T00:51:56 Z mzv Esej (COCI15_esej) C++17
80 / 80
14 ms 908 KB
#include <bits/stdc++.h>

#define ccd ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define ll long long
#define endl '\n'

using namespace std;

/* ------------------------ hi lol ------------------------ */

int n,m;
char words[6];

int main() {
    ccd
    cin >> n >> m;
    for (int i=1;i<=5;i++) {
    	words[i]='a';
    }
    while (m--) {
    	for (int i=1;i<=5;i++) {
    		cout << words[i];
    	}
    	if (m>0) cout << " ";
    	for (int i=5;i>=1;i--) {
    		if (words[i]>='z') {
    			words[i]='a';
    			continue;
    		}
    		words[i]++;
    		break;
    	}
    }
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 5 ms 448 KB Output is correct
7 Correct 13 ms 836 KB Output is correct
8 Correct 13 ms 852 KB Output is correct
9 Correct 13 ms 832 KB Output is correct
10 Correct 14 ms 908 KB Output is correct