Advertisement
MrMarvel

Untitled

Oct 6th, 2022 (edited)
1,018
0
304 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.39 KB | None | 0 0
  1. import java.util.*
  2. import javax.swing.plaf.synth.SynthTextAreaUI
  3.  
  4. fun main() {
  5.     val sc = Scanner(System.`in`)
  6.     val line = sc.nextLine()
  7.     val gens = IntArray(4)
  8.     for (ch in line) {
  9.         if (ch == 'A') gens[0]++
  10.         if (ch == 'T') gens[1]++
  11.         if (ch == 'G') gens[2]++
  12.         if (ch == 'C') gens[3]++
  13.     }
  14.     print("${gens[0]} ${gens[1]} ${gens[2]} ${gens[3]}")
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement