QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#781460 | #8025. Fibonacci | Unstalian# | WA | 1ms | 3700kb | C++14 | 405b | 2024-11-25 16:11:30 | 2024-11-25 16:11:43 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define maxn
int n, m;
void solve(){
cin >> n;
int t = n / 3;
int ans = 0;
if(t >= 2)
ans += t * (n - 1) - (t - 1) * t / 2;
else
ans = n - 1;
cout << ans<<endl;
}
signed main(){
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int T = 1;
// cin >> T;
while (T --)
solve();
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3700kb
input:
1
output:
0
result:
ok answer is '0'
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3572kb
input:
2
output:
1
result:
wrong answer expected '0', found '1'