4 条题解
-
3
T20 数数题解
目前不知道为什么这么水的题难度这么高,第一步:取消
cin与C语言输入scanf()的流同步,加速输入。第二步:依题意输入 。
第三步(暴力):利用大量 语句以及与条件(
&&),不等于(!=)判定。第四步:输出答案。
上代码:
#include<bits/stdc++.h> using namespace std; int a, b, c, d, e; int ans=1; signed main() { cin.tie(nullptr)->ios::sync_with_stdio(false); cin >> a >> b >> c >> d >> e; if (a != b && a != c && a != d && a != e) ans++; if (b != c && b != d && b != e)ans++; if (c != d && c != e)ans++; if (d != e)ans++; cout<<ans<<'\n'; }@20250001 给我硬币
信息
- ID
- 20
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 1
- 标签
- 递交数
- 462
- 已通过
- 123
- 上传者