社区讨论
真---暴力
灌水区参与者 6已保存回复 10
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 10 条
- 当前快照
- 1 份
- 快照标识符
- @mi6zd0zi
- 此快照首次捕获于
- 2025/11/20 13:18 4 个月前
- 此快照最后确认于
- 2025/11/20 13:18 4 个月前
CPP
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
int a,b,c,d,e,f,ans,sum;
bool s[1001];
int main()
{
scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);
for(int i=0;i<=a;i++)
{
for(int j=0;j<=b;j++)
{
for(int k=0;k<=c;k++)
{
for(int o=0;o<=d;o++)
{
for(int p=0;p<=e;p++)
{
for(int q=0;q<=f;q++)
{
int r=i+j*2+k*3+o*5+p*10+q*20;
if(!s[r]&&r!=0)
{
s[r]=1;
ans++;
}
}
}
}
}
}
}
cout<<"Total="<<ans<<"\n";
return 0;
}
回复
共 10 条回复,欢迎继续交流。
正在加载回复...