Seven Wonders
This commit is contained in:
7
sevenwonders.py
Normal file
7
sevenwonders.py
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
s = input().strip()
|
||||||
|
|
||||||
|
t = s.count("T")
|
||||||
|
c = s.count("C")
|
||||||
|
g = s.count("G")
|
||||||
|
|
||||||
|
print(t**2 + c**2 + g**2 + (min((t, c, g)) * 7))
|
||||||
Reference in New Issue
Block a user