i am mediocre and this really only yields like 6/100 lol, fails 48 tests xd

This commit is contained in:
fzorb 2025-05-07 23:30:04 +03:00
parent 2be90bb54d
commit 292c95eaca

24
61/solutie.cpp Normal file
View file

@ -0,0 +1,24 @@
#include <iostream>
using namespace std;
int main() {
int n, k, offset=0;
cin >> n >> k;
for (int i = 0; i < n; i++) {
for (int j = 0; j < offset; j++) {
cout << "1";
}
for (int j = 0; j < n-k; j++) {
if (offset + j < n) {
cout << "0";
}
}
for (int j = 0; j < k-offset; j++) {
cout << "1";
}
cout << endl;
offset++;
}
return 0;
}