QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#732725 | #8777. Passport Stamps | jiujiu# | Compile Error | / | / | Python3 | 488b | 2024-11-10 15:41:48 | 2024-11-10 15:41:54 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#define int long long
const int MAXN = 1e5 + 5;
int n;
ll m;
ll a[MAXN];
int main()
{
int i;
cin>>n>>m;
ll sum = 0;
for (i = 1; i <= n; ++i)
cin>>a[i];
for (i = 1; i <= n; ++i)
{
ll x = a[i];
if ((__int128)(x - 1) * i + sum >= (__int128)m)
{
break;
}
sum += x;
}
cout<<i-1<<endl;
return 0;
}
詳細信息
File "answer.code", line 2 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax