Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
92535 | 只因你太美(Ikun 真爱粉) | 22第n项的数 | C++ | Compile Error | 0 MS | 0 KB | 567 | 2024-10-05 16:48:20 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ double a,b,c,d; int n; cin>>n>>a>>b>>c>>d; if(b-a==c-b&&b-a==d-c){ if(c-b!=0){ cout<<a+(n-1)*(b-a); return 0; } else{ cout<<a; return 0; } } if(b/a==c/b&&b/a==d/c){ cout<<a*pow(b/a*1.0,n-1); }
Main.cc: In function 'int main()': Main.cc:23:5: error: expected '}' at end of input } ^