NC235385. Falfa学群论
描述
输入描述
一个字符串,表示Falfa想知道阶数的群的字母表示。数据保证字符串属于集合{"B","Co_1","Co_2","Co_3","F_1","F_2","F_3","F_5","Fi'_{24}","Fi_{22}","Fi_{23}","H-H-McK","H-J-McL","H-N","H-S","Ha-J-W","He","J_1","J_2","J_3","J_4","Ly","Ly-S","M","M(22)","M(23)","M(24)'","M_{11}","M_{12}","M_{22}","M_{23}","M_{24}","McL","O'N","O'N-S","R-C-W","Ru","Suz","Th"};
输出描述
一个数字,表示输入的群的阶数。
示例1
输入:
M
输出:
808017424794512875886459904961710757005754368000000000
C++(g++ 7.5.0) 解法, 执行用时: 3ms, 内存消耗: 484K, 提交时间: 2022-08-18 16:45:24
#include <bits/stdc++.h> using namespace std; map<string, string> mp; int main() { mp["B"] = "4154781481226426191177580544000000"; mp["Co_1"] = "4157776806543360000"; mp["Co_2"] = "42305421312000"; mp["Co_3"] = "495766656000"; mp["F_1"] = "808017424794512875886459904961710757005754368000000000"; mp["F_2"] = "4154781481226426191177580544000000"; mp["F_3"] = "90745943887872000"; mp["F_5"] = "273030912000000"; mp["Fi'_{24}"] = "1255205709190661721292800"; mp["Fi_{22}"] = "64561751654400"; mp["Fi_{23}"] = "4089470473293004800"; mp["H-H-McK"] = "4030387200"; mp["H-J-McL"] = "50232960"; mp["H-N"] = "273030912000000"; mp["H-S"] = "44352000"; mp["Ha-J-W"] = "604800"; mp["He"] = "4030387200"; mp["J_1"] = "175560"; mp["J_2"] = "604800"; mp["J_3"] = "50232960"; mp["J_4"] = "86775571046077562880"; mp["Ly"] = "51765179004000000"; mp["Ly-S"] = "51765179004000000"; mp["M"] = "808017424794512875886459904961710757005754368000000000"; mp["M(22)"] = "64561751654400"; mp["M(23)"] = "4089470473293004800"; mp["M(24)'"] = "1255205709190661721292800"; mp["M_{11}"] = "7920"; mp["M_{12}"] = "95040"; mp["M_{22}"] = "443520"; mp["M_{23}"] = "10200960"; mp["M_{24}"] = "244823040"; mp["McL"] = "898128000"; mp["O'N"] = "460815505920"; mp["O'N-S"] = "460815505920"; mp["R-C-W"] = "145926144000"; mp["Ru"] = "145926144000"; mp["Suz"] = "448345497600"; mp["Th"] = "90745943887872000"; string s; cin >> s; cout << mp[s] << endl; return 0; }
C++ 解法, 执行用时: 7ms, 内存消耗: 520K, 提交时间: 2022-04-02 21:35:10
#include <bits/stdc++.h> using namespace std; int main() { string s; cin>>s; if(s=="M"||s=="F_1") puts("808017424794512875886459904961710757005754368000000000"); if(s=="B"||s=="F_2") puts("4154781481226426191177580544000000"); if(s=="Fi'_{24}"||s=="M(24)'") puts("1255205709190661721292800"); if(s=="Fi_{23}"||s=="M(23)") puts("4089470473293004800"); if(s=="Fi_{22}"||s=="M(22)") puts("64561751654400"); if(s=="Th"||s=="F_3") puts("90745943887872000"); if(s=="Ly"||s=="Ly-S") puts("51765179004000000"); if(s=="H-N"||s=="F_5") puts("273030912000000"); if(s=="Co_1") puts("4157776806543360000"); if(s=="Co_2") puts("42305421312000"); if(s=="Co_3") puts("495766656000"); if(s=="O'N"||s=="O'N-S") puts("460815505920"); if(s=="Suz") puts("448345497600"); if(s=="Ru"||s=="R-C-W") puts("145926144000"); if(s=="He"||s=="H-H-McK") puts("4030387200"); if(s=="McL") puts("898128000"); if(s=="H-S") puts("44352000"); if(s=="J_4") puts("86775571046077562880"); if(s=="J_3"||s=="H-J-McL") puts("50232960"); if(s=="J_2"||s=="Ha-J-W") puts("604800"); if(s=="J_1") puts("175560"); if(s=="M_{24}") puts("244823040"); if(s=="M_{23}") puts("10200960"); if(s=="M_{22}") puts("443520"); if(s=="M_{12}") puts("95040"); if(s=="M_{11}") puts("7920"); }
pypy3 解法, 执行用时: 160ms, 内存消耗: 25840K, 提交时间: 2022-04-01 21:36:57
str={ 'B':4154781481226426191177580544000000, 'Co_1':4157776806543360000, 'Co_2':42305421312000, 'Co_3':495766656000, 'F_1':808017424794512875886459904961710757005754368000000000, 'F_2':4154781481226426191177580544000000, 'F_3':90745943887872000, 'F_5':273030912000000, 'Fi\'_{24}':1255205709190661721292800, 'Fi_{22}':64561751654400, 'Fi_{23}':4089470473293004800, 'H-H-McK':4030387200, 'H-J-McL':50232960, 'H-N':273030912000000, 'H-S':44352000, 'Ha-J-W':604800, 'He':4030387200, 'J_1':175560, 'J_2':604800, 'J_3':50232960, 'J_4':86775571046077562880, 'Ly':51765179004000000, 'Ly-S':51765179004000000, 'M':808017424794512875886459904961710757005754368000000000 , 'M(22)':64561751654400, 'M(23)':4089470473293004800, 'M(24)\'':1255205709190661721292800, 'M_{11}':7920, 'M_{12}':95040, 'M_{22}':443520, 'M_{23}':10200960, 'M_{24}':244823040 , 'McL':898128000, 'O\'N':460815505920, 'O\'N-S':460815505920, 'R-C-W':145926144000, 'Ru':145926144000, 'Suz':448345497600, 'Th':90745943887872000, } s = input() print(str[s])