April Fools Contest 2017 愚人节专场
题目链接:http://codeforces.com/contest/784/problem/A
A.Numbers Joke
题意:给定一个数,要求通过不可描述的变换输出另一个数
思路:https://oeis.org/A006753
所谓的joke numbers就是对一个合数而言各位数字相加==他的质因子各位数字相加
原来这东西有个表=_= 输入仅表示第几个,打表即可(?)
1 #include<bits/stdc++.h> 2 using namespace std; 3 4 int n; 5 int a[31]={4,22, 27, 58, 85, 94, 121, 166, 202, 265, 274, 319, 346, 355, 378, 382, 391, 438, 454, 483, 517, 526, 535, 562, 576, 588, 627, 634, 636, 645}; 6 int main() 7 { 8 #ifndef ONLINE_JUDGE 9 //freopen("in.txt","r",stdin); 10 #endif 11 scanf("%d",&n); 12 printf("%d",a[n-1]); 13 return 0; 14 }
B.Kids' Riddle
题意:给定一个数,要求通过不可描述的变换输出另一个数
思路:将这个数转化为16进制之后,数一下有多少个洞(?)
例如 8有两个 0有1个·····
代码略