Task: | Palindromi |
Sender: | ToukoP |
Submission time: | 2024-01-20 13:09:50 +0200 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.00 s | details |
#2 | ACCEPTED | 0.00 s | details |
#3 | WRONG ANSWER | 0.00 s | details |
#4 | ACCEPTED | 0.00 s | details |
#5 | ACCEPTED | 0.00 s | details |
#6 | WRONG ANSWER | 0.00 s | details |
#7 | ACCEPTED | 0.00 s | details |
#8 | ACCEPTED | 0.00 s | details |
#9 | ACCEPTED | 0.00 s | details |
#10 | WRONG ANSWER | 0.00 s | details |
#11 | ACCEPTED | 0.00 s | details |
#12 | ACCEPTED | 0.00 s | details |
#13 | WRONG ANSWER | 0.00 s | details |
#14 | ACCEPTED | 0.00 s | details |
#15 | ACCEPTED | 0.00 s | details |
#16 | WRONG ANSWER | 0.00 s | details |
#17 | WRONG ANSWER | 0.00 s | details |
Code
#include <bits/stdc++.h> using namespace std; int main() { string abc = "abcdefghijklmnopqrstuvwyxz"; int n; int k; cin >> n >> k; int o = 0; int c = 0; while (true) { for (int i = 0; i < k; i++) { cout << abc[(min(i, k - i) + o) % abc.length()]; c++; if (c == n) { return 0; } } o++; } } // g++ --std=c++11 -O2 -Wall test.cpp -o test && ./test
Test details
Test 1
Verdict: ACCEPTED
input |
---|
1 1 |
correct output |
---|
a |
user output |
---|
a |
Test 2
Verdict: ACCEPTED
input |
---|
2 1 |
correct output |
---|
ab |
user output |
---|
ab |
Test 3
Verdict: WRONG ANSWER
input |
---|
2 2 |
correct output |
---|
aa |
user output |
---|
ab |
Test 4
Verdict: ACCEPTED
input |
---|
3 1 |
correct output |
---|
abc |
user output |
---|
abc |
Test 5
Verdict: ACCEPTED
input |
---|
3 2 |
correct output |
---|
aab |
user output |
---|
abb |
Test 6
Verdict: WRONG ANSWER
input |
---|
3 3 |
correct output |
---|
aaa |
user output |
---|
abb |
Test 7
Verdict: ACCEPTED
input |
---|
4 1 |
correct output |
---|
abca |
user output |
---|
abcd |
Test 8
Verdict: ACCEPTED
input |
---|
4 2 |
correct output |
---|
aabc |
user output |
---|
abbc |
Test 9
Verdict: ACCEPTED
input |
---|
4 3 |
correct output |
---|
aaab |
user output |
---|
abbb |
Test 10
Verdict: WRONG ANSWER
input |
---|
4 4 |
correct output |
---|
aaaa |
user output |
---|
abcb |
Test 11
Verdict: ACCEPTED
input |
---|
100 1 |
correct output |
---|
abcabcabcabcabcabcabcabcabcabc... |
user output |
---|
abcdefghijklmnopqrstuvwyxzabcd... Truncated |
Test 12
Verdict: ACCEPTED
input |
---|
100 2 |
correct output |
---|
aabcabcabcabcabcabcabcabcabcab... |
user output |
---|
abbccddeeffgghhiijjkkllmmnnoop... Truncated |
Test 13
Verdict: WRONG ANSWER
input |
---|
100 5 |
correct output |
---|
aaaaabcabcabcabcabcabcabcabcab... |
user output |
---|
abccbbcddccdeeddeffeefggffghhg... Truncated |
Test 14
Verdict: ACCEPTED
input |
---|
100 10 |
correct output |
---|
aaaaaaaaaabcabcabcabcabcabcabc... |
user output |
---|
abcdefedcbbcdefgfedccdefghgfed... Truncated |
Test 15
Verdict: ACCEPTED
input |
---|
100 50 |
correct output |
---|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
user output |
---|
abcdefghijklmnopqrstuvwyxzxywv... Truncated |
Test 16
Verdict: WRONG ANSWER
input |
---|
100 90 |
correct output |
---|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
user output |
---|
abcdefghijklmnopqrstuvwyxzabcd... Truncated |
Test 17
Verdict: WRONG ANSWER
input |
---|
100 100 |
correct output |
---|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... |
user output |
---|
abcdefghijklmnopqrstuvwyxzabcd... Truncated |