QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#88949 | #3919. Restore the sequence | jamal143# | TL | 0ms | 0kb | C++14 | 313b | 2023-03-18 00:59:39 | 2023-03-18 00:59:40 |
Judging History
answer
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a = 0, b = 1, c;
while (true) {
c = a + b;
a = b;
b = c;
if (c == n) {
cout << a << " " << b << endl;
break;
}
}
return 0;
}
詳細信息
Test #1:
score: 0
Time Limit Exceeded
input:
42