| Task: | Merkkijono |
| Sender: | valk |
| Submission time: | 2021-10-13 19:10:57 +0300 |
| Language: | Java |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.33 s | details |
| #2 | WRONG ANSWER | 0.34 s | details |
| #3 | WRONG ANSWER | 0.34 s | details |
| #4 | WRONG ANSWER | 0.34 s | details |
| #5 | WRONG ANSWER | 0.35 s | details |
| #6 | WRONG ANSWER | 0.35 s | details |
| #7 | WRONG ANSWER | 0.36 s | details |
| #8 | WRONG ANSWER | 0.36 s | details |
| #9 | WRONG ANSWER | 0.39 s | details |
| #10 | WRONG ANSWER | 0.41 s | details |
| #11 | WRONG ANSWER | 0.42 s | details |
| #12 | WRONG ANSWER | 0.46 s | details |
| #13 | WRONG ANSWER | 0.55 s | details |
| #14 | WRONG ANSWER | 0.65 s | details |
| #15 | WRONG ANSWER | 0.95 s | details |
| #16 | TIME LIMIT EXCEEDED | -- | details |
Code
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
String letter = "abcdefghijklmnopqrstuvwxyz";
Scanner input = new Scanner(System.in);
int a = input.nextInt(); //length
String fString = "";
for(int i = 0; i < a; i++) {
String currentLetter = letter.substring(i, i+1);
System.out.println("starting " + i + " letter " + currentLetter);
String newString = "";
int l = fString.length();
int it = 0;
newString += currentLetter;
//System.out.println("Free ram:" + Runtime.getRuntime().freeMemory());
System.out.println("length " + l + " new " + newString + " start of new " + fString);
while(it<l) {
newString += fString.substring(it, it+1);
newString += currentLetter;
it++;
System.out.println("it " + it);
}
fString = newString; //seemingly the failure point. too long?
System.out.println("mid " + fString);
}
System.out.println(fString);
input.close();
}
}
Test details
Test 1
Verdict: WRONG ANSWER
| input |
|---|
| 1 |
| correct output |
|---|
| a |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a a |
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 2 |
| correct output |
|---|
| bab |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 3
Verdict: WRONG ANSWER
| input |
|---|
| 3 |
| correct output |
|---|
| cbcacbc |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 4
Verdict: WRONG ANSWER
| input |
|---|
| 4 |
| correct output |
|---|
| dcdbdcdadcdbdcd |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 5
Verdict: WRONG ANSWER
| input |
|---|
| 5 |
| correct output |
|---|
| edecedebedecedeaedecedebedeced... |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| 6 |
| correct output |
|---|
| fefdfefcfefdfefbfefdfefcfefdfe... |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 7
Verdict: WRONG ANSWER
| input |
|---|
| 7 |
| correct output |
|---|
| gfgegfgdgfgegfgcgfgegfgdgfgegf... |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 8
Verdict: WRONG ANSWER
| input |
|---|
| 8 |
| correct output |
|---|
| hghfhghehghfhghdhghfhghehghfhg... |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 9
Verdict: WRONG ANSWER
| input |
|---|
| 9 |
| correct output |
|---|
| ihigihifihigihieihigihifihigih... |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 10
Verdict: WRONG ANSWER
| input |
|---|
| 10 |
| correct output |
|---|
| jijhjijgjijhjijfjijhjijgjijhji... |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 11
Verdict: WRONG ANSWER
| input |
|---|
| 11 |
| correct output |
|---|
| kjkikjkhkjkikjkgkjkikjkhkjkikj... |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 12
Verdict: WRONG ANSWER
| input |
|---|
| 12 |
| correct output |
|---|
| lkljlklilkljlklhlkljlklilkljlk... |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 13
Verdict: WRONG ANSWER
| input |
|---|
| 13 |
| correct output |
|---|
| mlmkmlmjmlmkmlmimlmkmlmjmlmkml... |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 14
Verdict: WRONG ANSWER
| input |
|---|
| 14 |
| correct output |
|---|
| nmnlnmnknmnlnmnjnmnlnmnknmnlnm... |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 15
Verdict: WRONG ANSWER
| input |
|---|
| 15 |
| correct output |
|---|
| onomonolonomonokonomonolonomon... |
| user output |
|---|
| starting 0 letter a length 0 new a start of new mid a starting 1 letter b length 1 new b ... Truncated |
Test 16
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 16 |
| correct output |
|---|
| popnpopmpopnpoplpopnpopmpopnpo... |
| user output |
|---|
| (empty) |
