QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#781475 | #8025. Fibonacci | Unstalian# | WA | 0ms | 3652kb | C++14 | 405b | 2024-11-25 16:13:07 | 2024-11-25 16:13:14 |
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();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3636kb
input:
1
output:
0
result:
ok answer is '0'
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3652kb
input:
2
output:
1
result:
wrong answer expected '0', found '1'