计算有多少种不同的魔方的一个计算,怎么使用C语言的程序的编写的过程的设计来实现的呢?

Problem Description
Aunt Zhang, well known as 张阿姨, is a fan of Rubik’s cube. One day she buys a new one and would like to color it as a gift to send to Teacher Liu, well known as 刘老师. As Aunt Zhang is so ingenuity, she can color all the cube’s points, edges and faces with K different color. Now Aunt Zhang wants to know how many different cubes she can get. Two cubes are considered as the same if and only if one can change to another ONLY by rotating the WHOLE cube. Note that every face of Rubik’s cube is consists of nine small faces. Aunt Zhang can color arbitrary color as she like which means that she doesn’t need to color the nine small faces with same color in a big face. You can assume that Aunt Zhang has 74 different elements to color. (8 points + 12 edges + 9*6=54 small faces)

Input
The first line of the date is an integer T, which is the number of the text cases.
Then T cases follow, each case contains one integer K, which is the number of colors. T<=100, K<=100.

Output
For each case, you should output the number of different cubes.
Give your answer modulo 10007.

Sample Input
3
1
2
3

Sample Output
Case 1: 1
Case 2: 1330
Case 3: 9505

2个回答

polya定理,挺难的,有好几类置换

请参考别人分享代码地址:https://blog.csdn.net/zfgylbcc/article/details/52279754

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐