QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#781475#8025. FibonacciUnstalian#WA 0ms3652kbC++14405b2024-11-25 16:13:072024-11-25 16:13:14

Judging History

你现在查看的是最新测评结果

  • [2024-11-25 16:13:14]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3652kb
  • [2024-11-25 16:13:07]
  • 提交

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'