Codeforces Beta Round #73 (Div.2 Div.1)
はい。
http://codeforces.com/contest/88
A. Chord
ざっくりと大意
・なんかギターのコード??
方針のようなもの
・解読できず。。。
477822のtmiyamonさんをパクリ
#!/usr/bin/env python # -*- coding: UTF-8 -*- import time import sys, io import re, math #start = time.clock() #a,b,c=map(str, raw_input().split()) l=['C','C#','D','D#','E','F','F#','G','G#','A','B','H']*2 x,y,z=map(str, raw_input().split()) a=[(x,y,z),(x,z,y),(y,x,z),(y,z,x),(z,x,y),(z,y,x)] for xx,yy,zz in a: b=l.index(xx) chk=l[b:] if chk.index(yy)-chk.index(xx)==4 and chk.index(zz)-chk.index(yy)==3: print 'major' sys.exit() elif chk.index(yy)-chk.index(xx)==3 and chk.index(zz)-chk.index(yy)==4: print 'minor' sys.exit() print 'strange'
なんか初回に自力で書いたのが上手く行かなかったのが音階のリスト作成でD,D#が抜けてた影響があるかも