Hendrie序列 The Hendrie Sequence
题目描述
[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=16&page=show_problem&problem=1420
[PDF](https://uva.onlinejudge.org/external/104/p10479.pdf)
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10479/0056e06d2141996ccf0c97acf0bc7882170124ee.png)
输入输出格式
输入格式
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10479/9262b945f9a1cf9719badb6229f8536aca83c2e6.png)
输出格式
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10479/eadc06f9b9e8ed45c49144a0059fc765e3e5bdf4.png)
输入输出样例
输入样例 #1
4
7
44
806856837013209088
0
输出样例 #1
2
0
3
16