Task: | Osajono |
Sender: | niklaskoskinen |
Submission time: | 2015-09-30 15:54:59 +0300 |
Language: | Java |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
#3 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.20 s | 1 | details |
#2 | WRONG ANSWER | 0.19 s | 1 | details |
#3 | WRONG ANSWER | 0.20 s | 1 | details |
#4 | WRONG ANSWER | 0.19 s | 1 | details |
#5 | WRONG ANSWER | 0.19 s | 1 | details |
#6 | WRONG ANSWER | 0.21 s | 2 | details |
#7 | WRONG ANSWER | 0.21 s | 2 | details |
#8 | WRONG ANSWER | 0.21 s | 2 | details |
#9 | WRONG ANSWER | 0.21 s | 2 | details |
#10 | WRONG ANSWER | 0.22 s | 2 | details |
#11 | WRONG ANSWER | 0.30 s | 3 | details |
#12 | WRONG ANSWER | 0.27 s | 3 | details |
#13 | WRONG ANSWER | 0.26 s | 3 | details |
#14 | WRONG ANSWER | 0.27 s | 3 | details |
#15 | WRONG ANSWER | 0.29 s | 3 | details |
Code
import java.util.Scanner; public class Test { public static void main(String[] args) { System.out.println("String: "); Scanner inp = new Scanner(System.in); String test = inp.nextLine(); int[] num; num = new int[26]; test = test.toUpperCase(); char[] testa = test.toCharArray(); for(char t : testa){ int cnum = (int) t; int ccnum = cnum - 65; num[ccnum] = num[ccnum] + 1; } int ans = 0; for(int n : num){ ans = ans + ((n * (n + 1))/2); } System.out.println(ans); } }
Test details
Test 1
Group: 1
Verdict: WRONG ANSWER
input |
---|
BBBAABBBAAAABBAAAABAABAABBBBBB... |
correct output |
---|
2554 |
user output |
---|
String: 2554 |
Test 2
Group: 1
Verdict: WRONG ANSWER
input |
---|
GDFVYWQCZAFGICSXOSWBZMGPDBSSVL... |
correct output |
---|
299 |
user output |
---|
String: 299 |
Test 3
Group: 1
Verdict: WRONG ANSWER
input |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAZAAAA... |
correct output |
---|
4314 |
user output |
---|
String: 4314 |
Test 4
Group: 1
Verdict: WRONG ANSWER
input |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
correct output |
---|
4231 |
user output |
---|
String: 4231 |
Test 5
Group: 1
Verdict: WRONG ANSWER
input |
---|
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ... |
correct output |
---|
5050 |
user output |
---|
String: 5050 |
Test 6
Group: 2
Verdict: WRONG ANSWER
input |
---|
BBABABBBABBAABBABBABAABAAABABA... |
correct output |
---|
6253029 |
user output |
---|
String: 6253029 |
Test 7
Group: 2
Verdict: WRONG ANSWER
input |
---|
RBKJMLDVQMKHYKCNDIVVKOMFUXTFMG... |
correct output |
---|
485173 |
user output |
---|
String: 485173 |
Test 8
Group: 2
Verdict: WRONG ANSWER
input |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
correct output |
---|
12427725 |
user output |
---|
String: 12427725 |
Test 9
Group: 2
Verdict: WRONG ANSWER
input |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
correct output |
---|
12467549 |
user output |
---|
String: 12467549 |
Test 10
Group: 2
Verdict: WRONG ANSWER
input |
---|
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ... |
correct output |
---|
12502500 |
user output |
---|
String: 12502500 |
Test 11
Group: 3
Verdict: WRONG ANSWER
input |
---|
BAAAAABABBABAABAABABABBBABBAAB... |
correct output |
---|
2500051369 |
user output |
---|
String: -1794915927 |
Test 12
Group: 3
Verdict: WRONG ANSWER
input |
---|
ABBURXDRVXAYBPXXOQZNYHLWGUEEWR... |
correct output |
---|
192407124 |
user output |
---|
String: 192407124 |
Test 13
Group: 3
Verdict: WRONG ANSWER
input |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
correct output |
---|
4998050400 |
user output |
---|
String: 703083104 |
Test 14
Group: 3
Verdict: WRONG ANSWER
input |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
correct output |
---|
4998850144 |
user output |
---|
String: 703882848 |
Test 15
Group: 3
Verdict: WRONG ANSWER
input |
---|
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ... |
correct output |
---|
5000050000 |
user output |
---|
String: 705082704 |