Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
123901 李俊博 12序列的第n项 C++ Accepted 1 MS 268 KB 664 2025-07-10 14:45:28

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ /** long long a,b,c; cin>>a>>b>>c; if(a%c==0 && b%c==0){ cout<<a*b/(c*c); }else{ cout<<-1; } double h=100; for(int i=1;i<=10;i++){ h = h/2; } printf("%.6lf",h); **/ int a=1; int n; cin>>n; for(int i=0;i<n-1;i++){ a=a+i; } cout<<a<<endl; return 0; }