Task: | k-mer |
Sender: | Feeniksi |
Submission time: | 2016-09-27 16:37:48 +0300 |
Language: | Java |
Status: | READY |
Result: | ACCEPTED |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.10 s | details |
#2 | ACCEPTED | 0.11 s | details |
#3 | ACCEPTED | 0.09 s | details |
#4 | ACCEPTED | 0.10 s | details |
#5 | ACCEPTED | 0.10 s | details |
#6 | ACCEPTED | 0.09 s | details |
#7 | ACCEPTED | 0.10 s | details |
#8 | ACCEPTED | 0.10 s | details |
#9 | ACCEPTED | 0.10 s | details |
#10 | ACCEPTED | 0.11 s | details |
#11 | ACCEPTED | 0.11 s | details |
#12 | ACCEPTED | 0.10 s | details |
#13 | ACCEPTED | 0.10 s | details |
#14 | ACCEPTED | 0.09 s | details |
#15 | ACCEPTED | 0.09 s | details |
#16 | ACCEPTED | 0.10 s | details |
#17 | ACCEPTED | 0.11 s | details |
#18 | ACCEPTED | 0.10 s | details |
#19 | ACCEPTED | 0.10 s | details |
#20 | ACCEPTED | 0.10 s | details |
#21 | ACCEPTED | 0.10 s | details |
#22 | ACCEPTED | 0.10 s | details |
#23 | ACCEPTED | 0.10 s | details |
#24 | ACCEPTED | 0.10 s | details |
#25 | ACCEPTED | 0.10 s | details |
#26 | ACCEPTED | 0.10 s | details |
#27 | ACCEPTED | 0.10 s | details |
#28 | ACCEPTED | 0.12 s | details |
#29 | ACCEPTED | 0.10 s | details |
#30 | ACCEPTED | 0.10 s | details |
Code
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author viljampa */ public class Kilpa42 { /** * @param args the command line arguments */ public static void main(String[] args) { IO io = new IO(); String a = io.next(); // String m = "GCGC"; // String k = "ATAT"; int m = 0; int k = 0; for (int i = 0; i < a.length() - 3; i++) { if (a.charAt(i) == 'G' && a.charAt(i+1) == 'C' && a.charAt(i+2) == 'G' && a.charAt(i+3) == 'C') { m++; } else if (a.charAt(i) == 'A' && a.charAt(i+1) == 'T' && a.charAt(i+2) == 'A' && a.charAt(i+3) == 'T') { k++; } } if (m > k) io.println("Maija"); if (m<k) io.println("Kaaleppi"); if (m==k) io.println("not sure"); // String a = io.next(); // Lukee seuraavan välein erotellun merkkijonon. // int b = io.nextInt(); // Lukee seuraavan välein erotellun int-kokonaisluvun. // long c = io.nextLong(); // Lukee seuraavan välein erotellun long-kokonaisluvun. // double d = io.nextDouble(); // Lukee seuraavan välein erotellun double-liukuluvun. // Toimii kuten System.out.println. // io.println("Annoit syötteenä " + a + " " + b + " " + c + " " + d); io.close(); // TÄYTYY KUTSUA LOPUKSI, muuten tuloste voi jäädä kirjoittamatta } }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
CGGCGCAATATGCGCCGCGC |
correct output |
---|
Maija |
user output |
---|
Maija |
Test 2
Verdict: ACCEPTED
input |
---|
TAATATATATGGCGCGCAA |
correct output |
---|
Kaaleppi |
user output |
---|
Kaaleppi |
Test 3
Verdict: ACCEPTED
input |
---|
GCGCGTTAAA |
correct output |
---|
Maija |
user output |
---|
Maija |
Test 4
Verdict: ACCEPTED
input |
---|
CAATCGCGCAATATTGCGC |
correct output |
---|
Maija |
user output |
---|
Maija |
Test 5
Verdict: ACCEPTED
input |
---|
ATATATATGCGCGCGCTAA |
correct output |
---|
not sure |
user output |
---|
not sure |
Test 6
Verdict: ACCEPTED
input |
---|
AATATATATGGCGCGCGC |
correct output |
---|
not sure |
user output |
---|
not sure |
Test 7
Verdict: ACCEPTED
input |
---|
ATATGCGGTT |
correct output |
---|
Kaaleppi |
user output |
---|
Kaaleppi |
Test 8
Verdict: ACCEPTED
input |
---|
TGTTAGCGCGCGTAACATCG |
correct output |
---|
Maija |
user output |
---|
Maija |
Test 9
Verdict: ACCEPTED
input |
---|
GCGCATGAGATATGG |
correct output |
---|
not sure |
user output |
---|
not sure |
Test 10
Verdict: ACCEPTED
input |
---|
ATATGCGCGCGCATATGCGCGCGCATATAT... |
correct output |
---|
Kaaleppi |
user output |
---|
Kaaleppi |
Test 11
Verdict: ACCEPTED
input |
---|
GCGCTATATGCGCGTATATAGCGCCATATC... |
correct output |
---|
Kaaleppi |
user output |
---|
Kaaleppi |
Test 12
Verdict: ACCEPTED
input |
---|
CATATATATCTGGCGCGATATGTTAGCGCG... |
correct output |
---|
Maija |
user output |
---|
Maija |
Test 13
Verdict: ACCEPTED
input |
---|
CCATATACCGCGCTAGCGCCGCGCGCGCGG... |
correct output |
---|
Maija |
user output |
---|
Maija |
Test 14
Verdict: ACCEPTED
input |
---|
ATATGTGGCTGCGCGGCCTGGTAGACGTAT... |
correct output |
---|
Maija |
user output |
---|
Maija |
Test 15
Verdict: ACCEPTED
input |
---|
ATATATATGCGCGCGCATATATATATATAT... |
correct output |
---|
Kaaleppi |
user output |
---|
Kaaleppi |
Test 16
Verdict: ACCEPTED
input |
---|
ATATATATGCGCGCGCATATCTGCGCGCGC... |
correct output |
---|
Kaaleppi |
user output |
---|
Kaaleppi |
Test 17
Verdict: ACCEPTED
input |
---|
ATATATATGATATATATTGCAAATATGCAT... |
correct output |
---|
Kaaleppi |
user output |
---|
Kaaleppi |
Test 18
Verdict: ACCEPTED
input |
---|
TCCGGGCGCTATATGCGCCGCGCCAGTTGA... |
correct output |
---|
Maija |
user output |
---|
Maija |
Test 19
Verdict: ACCEPTED
input |
---|
CATATAGAGCGCTGGACGCAAGTGTCATAT... |
correct output |
---|
Maija |
user output |
---|
Maija |
Test 20
Verdict: ACCEPTED
input |
---|
GCGCGCGCATATGCGCATATGCGCATATGC... |
correct output |
---|
Maija |
user output |
---|
Maija |
Test 21
Verdict: ACCEPTED
input |
---|
CGTAAGCGCATATAGCGCATATGCGCGCGC... |
correct output |
---|
Maija |
user output |
---|
Maija |
Test 22
Verdict: ACCEPTED
input |
---|
TAATATATATATATGCGCGAGCGCGCGCAT... |
correct output |
---|
Kaaleppi |
user output |
---|
Kaaleppi |
Test 23
Verdict: ACCEPTED
input |
---|
GGCGCATATATAACCAGGCGCGCGCATATA... |
correct output |
---|
Kaaleppi |
user output |
---|
Kaaleppi |
Test 24
Verdict: ACCEPTED
input |
---|
CAGACACAAGCGCCGGCGCAGATATGATAT... |
correct output |
---|
Maija |
user output |
---|
Maija |
Test 25
Verdict: ACCEPTED
input |
---|
ATATGCGCGCGCATATATATGCGCGCGCGC... |
correct output |
---|
Kaaleppi |
user output |
---|
Kaaleppi |
Test 26
Verdict: ACCEPTED
input |
---|
AGATATGCGCGCGCATATAGCGCGCGCATA... |
correct output |
---|
Kaaleppi |
user output |
---|
Kaaleppi |
Test 27
Verdict: ACCEPTED
input |
---|
AATATATATCATATTATATTCATATATATT... |
correct output |
---|
Kaaleppi |
user output |
---|
Kaaleppi |
Test 28
Verdict: ACCEPTED
input |
---|
AGCGCGCGCAGGCGCTGTAATATGCGCCCT... |
correct output |
---|
Kaaleppi |
user output |
---|
Kaaleppi |
Test 29
Verdict: ACCEPTED
input |
---|
ACTGCTACGATATCATGGGCGCATATCGCT... |
correct output |
---|
Maija |
user output |
---|
Maija |
Test 30
Verdict: ACCEPTED
input |
---|
GCGCATATATATGCGCATATGCGCGCGCAT... |
correct output |
---|
Maija |
user output |
---|
Maija |