10分,求调
查看原帖
10分,求调
809150
ssssb楼主2025/2/8 14:51

while循环

#include<bits/stdc++.h>
#define N 202000
#define M 2020
#define ll long long
using namespace std;
ll x, n, sum;
int main(){
	cin.tie(0);cout.tie(0);
	cin >> x >> n;
	while ( n > 0 ){
		if ( x > 6 ){
			x = 1;
		}
		if ( x < 6 ){
			sum += 250;
		}
		x++;
		n--;
	}
	cout << sum;
	return 0;
}
2025/2/8 14:51
加载中...