QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#522548#5006. HeximalyzkkaiCompile Error//C++20771b2024-08-17 01:21:292024-08-17 01:21:30

Judging History

你现在查看的是最新测评结果

  • [2024-08-17 01:21:30]
  • 评测
  • [2024-08-17 01:21:29]
  • 提交

answer

#include <bits/stdc++.h>
#include <quadmath.h>
using namespace std;
using ll = long long;
using LL = long long;
using ld = __float128;
using pii = pair<int, int>;
#define sz(x) signed(size(x))

inline void solve() {
    string n;
    cin >> n;

    if (sz(n) <=  1) {
        int a = stoi(n);
        if (a >= 6)
            cout << 2 << '\n';
        else
            cout << 1 << '\n';

        return;
    }

    int k = sz(n) - 1;
    n.insert(n.begin() + 1, '.');
    ld t = strtoflt128(n.c_str(), NULL);

    t = k + log10q(t);
    t /= log10q(6);


    cout << (int)floorq(t) + 1 << '\n';

    return;
}

signed main() {
    cin.tie(0)->sync_with_stdio(0);
    int t = 1;
    while (t--)
        solve();
    return 0;
}

详细

/usr/bin/ld: /tmp/cc0V5A1N.o: in function `solve()':
answer.code:(.text._Z5solvev[_Z5solvev]+0xce): undefined reference to `strtoflt128'
/usr/bin/ld: answer.code:(.text._Z5solvev[_Z5solvev]+0xea): undefined reference to `log10q'
/usr/bin/ld: answer.code:(.text._Z5solvev[_Z5solvev]+0x109): undefined reference to `log10q'
/usr/bin/ld: answer.code:(.text._Z5solvev[_Z5solvev]+0x11c): undefined reference to `floorq'
collect2: error: ld returned 1 exit status