QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#577672#9136. Exponent CalculatorMiniLongWA 0ms3880kbC++172.9kb2024-09-20 13:58:452024-09-20 13:58:45

Judging History

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

  • [2024-09-20 13:58:45]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3880kb
  • [2024-09-20 13:58:45]
  • 提交

answer

#include <bits/stdc++.h>
#define _rep(i, x, y) for(int i = x; i <= y; ++i)
#define _req(i, x, y) for(int i = x; i >= y; --i)
#define _rev(i, u) for(int i = head[u]; i; i = e[i].nxt)
#define pb push_back
#define fi first
#define se second
#define mst(f, i) memset(f, i, sizeof f)
using namespace std;
#ifdef ONLINE_JUDGE
#define debug(...) 0
#else
#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#endif
typedef long long ll;
typedef pair<int, int> PII;
namespace fastio{
    #ifdef ONLINE_JUDGE
    char ibuf[1 << 20],*p1 = ibuf, *p2 = ibuf;
    #define get() p1 == p2 && (p2 = (p1 = ibuf) + fread(ibuf, 1, 1 << 20, stdin), p1 == p2) ? EOF : *p1++
    #else
    #define get() getchar()
    #endif
    template<typename T> inline void read(T &t){
        T x = 0, f = 1;
        char c = getchar();
        while(!isdigit(c)){
            if(c == '-') f = -f;
            c = getchar();
        }
        while(isdigit(c)) x = x * 10 + c - '0', c = getchar();
        t = x * f;
    }
    template<typename T, typename ... Args> inline void read(T &t, Args&... args){
        read(t);
        read(args...);
    }
    template<typename T> void write(T t){
        if(t < 0) putchar('-'), t = -t;
        if(t >= 10) write(t / 10);
        putchar(t % 10 + '0');
    }
    template<typename T, typename ... Args> void write(T t, Args... args){
        write(t), putchar(' '), write(args...);
    }
    template<typename T> void writeln(T t){
        write(t);
        puts("");
    }
    template<typename T> void writes(T t){
        write(t), putchar(' ');
    }
    #undef get
};
using namespace fastio;
#define multitest() int T; read(T); _rep(tCase, 1, T)
namespace Calculation{
    const ll mod = 998244353;
    ll ksm(ll p, ll h){ll base = p % mod, res = 1; while(h){if(h & 1ll) res = res * base % mod; base = base * base % mod, h >>= 1ll;} return res;}
    void dec(ll &x, ll y){x = ((x - y) % mod + mod) % mod;}
    void add(ll &x, ll y){x = (x + y) % mod;}
    void mul(ll &x, ll y){x = x * y % mod;}
    ll sub(ll x, ll y){return ((x - y) % mod + mod) % mod;}
    ll pls(ll x, ll y){return ((x + y) % mod + mod) % mod;}
    ll mult(ll x, ll y){return x * y % mod;}
}
using namespace Calculation;
const double e = 2.718281828459045;
double a[25];
double t = log10(e);
int main(){
    double h = (1 << 4);
    double x = 0;
    scanf("%lf", &x);
    x /= h;
    puts("25");
    printf("$0 = $0 * %.12lf\n", (1.00 / h));
    puts("$1 = $0 + 1");
    puts("$2 = $0");
    double a = x + 1, b = x, c = 1, d;
    _rep(i, 2, 7){
        b = b * x;
        b = b * (1.00 / (double)i);
        a = a + b;
        puts("$2 = $2 * $0");
        printf("$2 = $2 * %.12lf\n", 1.00 / (double)i);
        puts("$1 = $1 + $2");
    }
    _rep(i, 1, 4) puts("$1 = $1 * $1"), a = a * a;
    printf("%.10lf\n", a);
    return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3880kb

input:

input

output:

25
$0 = $0 * 0.062500000000
$1 = $0 + 1
$2 = $0
$2 = $2 * $0
$2 = $2 * 0.500000000000
$1 = $1 + $2
$2 = $2 * $0
$2 = $2 * 0.333333333333
$1 = $1 + $2
$2 = $2 * $0
$2 = $2 * 0.250000000000
$1 = $1 + $2
$2 = $2 * $0
$2 = $2 * 0.200000000000
$1 = $1 + $2
$2 = $2 * $0
$2 = $2 * 0.166666666667
$1 = $1 + ...

result:

wrong answer Can't recognize op #3: '$2 = $0' (in 1-indexation)