| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 147792 | 凌愉晴 | 计算函数值 | C++ | Wrong Answer | 0 | 0 MS | 264 KB | 207 | 2024-05-19 16:20:10 |
#include<bits/stdc++.h> using namespace std; double px(int x,int n){ if(n==1) return pow(x,n); else px(x,n-1)+pow(-1,n-1)*pow(x,n); } int main(){ int x,n; cin>>x>>n; printf("%.2lf",px(x,n)); }