navigation switch
Home
Contests
Notification
Clarification
Problems
Ranklist
Status
HackStatus
Problem 1002
递推公式感觉没错啊,怎么给我wrong
zjut201426811519
| 2016-05-14 20:19:32
Author
定义a[0]=a[1]=1; a[2]=2; 这个是每次的递推 if (i % 2==0) { a[i] = a[i / 2] * a[i / 2] + a[i / 2 - 1] * a[i / 2 - 1]; } else { a[i] = a[i / 2] * a[i / 2] +2* a[i / 2 - 1] * a[i / 2]; }
WYJ20154348
| 2016-05-14 20:22:36
# 1
这题数据比较大 需要高精度
zjut201426811519
| 2016-05-14 20:35:54
# 2
long long 都给错了,精度不够啊。。。自己写大数?
lironggui
| 2016-05-14 20:40:12
# 3
试试unsigned long long
zjut201426811519
| 2016-05-14 20:52:01
# 4
unsigned才*2,随便一试就知道错了啊。。。哎
lironggui
| 2016-05-14 21:20:08
# 5
你的程序输入为10到15时,输出是多少啊?
FurudeRika
| 2016-05-14 22:37:18
# 6
用大数模板 不然没得过
Title
Content