| 记录编号 | 201564 | 评测结果 | AAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 991.[NOIP 2010冲刺二]古代人的难题 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.003 s | ||
| 提交时间 | 2015-10-30 20:55:53 | 内存使用 | 0.31 MiB | ||
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
unsigned long long a,f,f1,f2,f3;
int main(){
freopen("puz.in","r",stdin);freopen("puz.out","w",stdout);
cin>>a;
f2=0,f1=1,f=1;
while(a>f){
f=f1+f2;
f3=f2;
f2=f1;
f1=f;
}
cout<<f2<<' '<<f3;
return 0;
}