10026_AFamousMusicComposer

2022-5-16 18:16| 发布者: Hocassian| 查看: 82| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-3-89504350042500-Problem List-采集的数据-后羿采集器.html

Pro.ID

10026

Title

A Famous Music Composer

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=10026

AC

24

Submit

44

Ratio

54.55%

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/32768 K (Java/Others)
  • 描述

    Mr. B is a famous music composer. One of his most famous work was his set of preludes. These 24 pieces span the 24 musical keys (there are musically distinct 12 scale notes, and each may use major or minor tonality). The 12 distinct scale notes are:

    Five of the notes have two alternate names, as is indicated above with equals sign. Thus, there are 17 possible names of scale notes, but only 12 musically distinct notes. When using one of these as the keynote for a musical key, we can further distinguish between major and minor tonalities. This gives 34 possible keys, of which 24 are musically distinct.

    In naming his preludes, Mr. B used all the keys except the following 10, which were named instead by their alternate names:

    Write a program that, given the name of a key, give an alternate name if it has one, or report the key name is unique.

    输入

    Each test case is described by one line having the format "note tonality", where "note" is one of the 17 names for the scale notes given above, and "tonality" is either "major" or "minor" (quotes for clarify).

    输出

    Description

    Mr. B is a famous music composer. One of his most famous work was his set of preludes. These 24 pieces span the 24 musical keys (there are musically distinct 12 scale notes, and each may use major or minor tonality). The 12 distinct scale notes are:

    Five of the notes have two alternate names, as is indicated above with equals sign. Thus, there are 17 possible names of scale notes, but only 12 musically distinct notes. When using one of these as the keynote for a musical key, we can further distinguish between major and minor tonalities. This gives 34 possible keys, of which 24 are musically distinct.

    In naming his preludes, Mr. B used all the keys except the following 10, which were named instead by their alternate names:

    Write a program that, given the name of a key, give an alternate name if it has one, or report the key name is unique.

    Input

    Each test case is described by one line having the format "note tonality", where "note" is one of the 17 names for the scale notes given above, and "tonality" is either "major" or "minor" (quotes for clarify).

    Output

    For each case output the required answer, following the format of the sample.

    Sample Input

    Ab minor
    D# major
    G minor

    Sample Output

    Case 1: G# minor
    Case 2: Eb major
    Case 3: UNIQUE

    Source

    样例输入

    Ab minor
    D# major
    G minor

    样例输出

    Case 1: G# minor
    Case 2: Eb major
    Case 3: UNIQUE

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部