QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#88950 | #3919. Restore the sequence | jamal143# | TL | 0ms | 0kb | C++14 | 336b | 2023-03-18 01:00:17 | 2023-03-18 01:00:20 |
Judging History
answer
#include <iostream>
using namespace std;
int main() {
#define int long long
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;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Time Limit Exceeded
input:
42