| Task: | String padding |
| Sender: | aalto26im_006 |
| Submission time: | 2026-11-02 17:39:50 +0200 |
| Language: | Java |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.05 s | details |
| #2 | WRONG ANSWER | 0.06 s | details |
| #3 | WRONG ANSWER | 0.05 s | details |
| #4 | WRONG ANSWER | 0.06 s | details |
| #5 | WRONG ANSWER | 0.05 s | details |
| #6 | WRONG ANSWER | 0.05 s | details |
| #7 | WRONG ANSWER | 0.05 s | details |
| #8 | WRONG ANSWER | 0.05 s | details |
| #9 | WRONG ANSWER | 0.05 s | details |
| #10 | WRONG ANSWER | 0.05 s | details |
| #11 | WRONG ANSWER | 0.05 s | details |
| #12 | WRONG ANSWER | 0.05 s | details |
| #13 | WRONG ANSWER | 0.05 s | details |
| #14 | WRONG ANSWER | 0.05 s | details |
| #15 | WRONG ANSWER | 0.05 s | details |
| #16 | WRONG ANSWER | 0.05 s | details |
| #17 | WRONG ANSWER | 0.05 s | details |
| #18 | WRONG ANSWER | 0.06 s | details |
Code
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.StringTokenizer;
public class StringPadding {
public static void main(String[] args) {
FastScanner input = new FastScanner(System.in);
int n = input.nextInt();
int m = input.nextLine().length();
int diff = n - m;
if (diff > 0){
BigInteger count = BigInteger.valueOf(52).modPow(BigInteger.valueOf(diff), BigInteger.valueOf(1000000007));
System.out.println(count);
} else {
System.out.println(0);
}
}
static class FastScanner { //static class fastScanner
private BufferedReader reader = null;
private StringTokenizer tokenizer = null;
public FastScanner(InputStream in) {
reader = new BufferedReader(new InputStreamReader(in));
tokenizer = null;
}
public String next() {
if (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public String nextLine() {
if (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
return reader.readLine();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken("\n");
}
public long nextLong() {
return Long.parseLong(next());
}
public int nextInt() {
return Integer.parseInt(next());
}
public double nextDouble() {
return Double.parseDouble(next());
}
public int[] nextIntArray(int n) {
int[] a = new int[n];
for (int i = 0; i < n; i++)
a[i] = nextInt();
return a;
}
public long[] nextLongArray(int n) {
long[] a = new long[n];
for (int i = 0; i < n; i++)
a[i] = nextLong();
return a;
}
}
}
Test details
Test 1
Verdict: WRONG ANSWER
| input |
|---|
| 100 YWANYWAZYWANYWA |
| correct output |
|---|
| 134837038 |
| user output |
|---|
| 639877451 |
Feedback: Incorrect character on line 1 col 1: expected "134837038", got "639877451"
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 100 EDMXEDVNEDMXED |
| correct output |
|---|
| 642715950 |
| user output |
|---|
| 273627221 |
Feedback: Incorrect character on line 1 col 1: expected "642715950", got "273627221"
Test 3
Verdict: WRONG ANSWER
| input |
|---|
| 100 SDARSDAWVSDARSDA |
| correct output |
|---|
| 748728234 |
| user output |
|---|
| 454613031 |
Feedback: Incorrect character on line 1 col 1: expected "748728234", got "454613031"
Test 4
Verdict: WRONG ANSWER
| input |
|---|
| 100 HBDHBSHBDHB |
| correct output |
|---|
| 594110560 |
| user output |
|---|
| 176021050 |
Feedback: Incorrect character on line 1 col 1: expected "594110560", got "176021050"
Test 5
Verdict: WRONG ANSWER
| input |
|---|
| 100 CUNXUYGNGNEROXVLASQB |
| correct output |
|---|
| 675706202 |
| user output |
|---|
| 994437277 |
Feedback: Incorrect character on line 1 col 1: expected "675706202", got "994437277"
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| 1000 LZAOLRKGLZAOLXLZAOLRKGLZAOLTLZ... |
| correct output |
|---|
| 318756627 |
| user output |
|---|
| 656003336 |
Feedback: Incorrect character on line 1 col 1: expected "318756627", got "656003336"
Test 7
Verdict: WRONG ANSWER
| input |
|---|
| 1000 SUASJSUASSGDSUASJSUASGKSUASJSU... |
| correct output |
|---|
| 367950233 |
| user output |
|---|
| 290039155 |
Feedback: Incorrect character on line 1 col 1: expected "367950233", got "290039155"
Test 8
Verdict: WRONG ANSWER
| input |
|---|
| 1000 NHYGNHEWNHYGNHFSNHYGNHEWNHYGNH... |
| correct output |
|---|
| 849646061 |
| user output |
|---|
| 116517148 |
Feedback: Incorrect character on line 1 col 1: expected "849646061", got "116517148"
Test 9
Verdict: WRONG ANSWER
| input |
|---|
| 1000 ZOCUZOCGRFZOCUZOCOQZOCUZOCGRFZ... |
| correct output |
|---|
| 32142571 |
| user output |
|---|
| 901778190 |
Feedback: Incorrect character on line 1 col 1: expected "32142571", got "901778190"
Test 10
Verdict: WRONG ANSWER
| input |
|---|
| 1000 LJZMKDTECKBXBTQQUMLGADBDNGWGPY... |
| correct output |
|---|
| 26128120 |
| user output |
|---|
| 376133976 |
Feedback: Incorrect character on line 1 col 1: expected "26128120", got "376133976"
Test 11
Verdict: WRONG ANSWER
| input |
|---|
| 1 A |
| correct output |
|---|
| 1 |
| user output |
|---|
| 0 |
Feedback: Incorrect character on line 1 col 1: expected "1", got "0"
Test 12
Verdict: WRONG ANSWER
| input |
|---|
| 100 AVXETIDRHKPAKRBEAAVHLOPFACULSE... |
| correct output |
|---|
| 228794815 |
| user output |
|---|
| 78936252 |
Feedback: Incorrect character on line 1 col 1: expected "228794815", got "78936252"
Test 13
Verdict: WRONG ANSWER
| input |
|---|
| 3 ABC |
| correct output |
|---|
| 1 |
| user output |
|---|
| 0 |
Feedback: Incorrect character on line 1 col 1: expected "1", got "0"
Test 14
Verdict: WRONG ANSWER
| input |
|---|
| 745 RRQOVUJRQBIMIQK |
| correct output |
|---|
| 504765084 |
| user output |
|---|
| 20802270 |
Feedback: Incorrect character on line 1 col 1: expected "504765084", got "20802270"
Test 15
Verdict: WRONG ANSWER
| input |
|---|
| 666 ABCABCDABCABCX |
| correct output |
|---|
| 920654188 |
| user output |
|---|
| 640952154 |
Feedback: Incorrect character on line 1 col 1: expected "920654188", got "640952154"
Test 16
Verdict: WRONG ANSWER
| input |
|---|
| 6 AA |
| correct output |
|---|
| 2212651 |
| user output |
|---|
| 7311616 |
Feedback: Incorrect character on line 1 col 1: expected "2212651", got "7311616"
Test 17
Verdict: WRONG ANSWER
| input |
|---|
| 1 B |
| correct output |
|---|
| 1 |
| user output |
|---|
| 0 |
Feedback: Incorrect character on line 1 col 1: expected "1", got "0"
Test 18
Verdict: WRONG ANSWER
| input |
|---|
| 1000 OMAKARAAA |
| correct output |
|---|
| 408042378 |
| user output |
|---|
| 135237258 |
Feedback: Incorrect character on line 1 col 1: expected "408042378", got "135237258"
