Skip to content

Instantly share code, notes, and snippets.

@naxmefy
Last active April 22, 2021 22:03
Show Gist options
  • Save naxmefy/e24cc7b54d10a5e2b9b5db7eb589e9de to your computer and use it in GitHub Desktop.
Save naxmefy/e24cc7b54d10a5e2b9b5db7eb589e9de to your computer and use it in GitHub Desktop.
found avg char in a word
r=readline().split``
console.log(String.fromCharCode(Math.round(r.reduce((p,c)=>{
console.error(c, c.charCodeAt())
return p+c.charCodeAt()
},0)/r.length)))
import sys
import math
s = input()
print(chr(round(sum(map(ord,s))/len(s))))
puts (1.0*gets.sum/$_.size).round.chr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment