QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#88949#3919. Restore the sequencejamal143#TL 0ms0kbC++14313b2023-03-18 00:59:392023-03-18 00:59:40

Judging History

This is the latest submission verdict.

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-18 00:59:40]
  • Judged
  • Verdict: TL
  • Time: 0ms
  • Memory: 0kb
  • [2023-03-18 00:59:39]
  • Submitted

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

output:


result: