588z raw 2022-08-25T14:31:06Z
390 bytes 28 "\n" (linefeed)
package main

import (
	"fmt"
	"math"
	"strconv"
)

var freqs4oct = map[string]float64{
	"C": 261.6,
	"D": 293.7,
	"E": 329.6,
	"F": 349.2,
	"G": 392.0,
	"A": 440.0,
	"B": 493.9,
}

func freq(note string) float64 {
	x, _ := strconv.Atoi(note[1:2])
	return freqs4oct[note[0:1]] / math.Pow(2, float64(4-x))
}

func main() {
	var note string
	fmt.Scanf("%s", &note)
	fmt.Println(freq(note))
}