点击查看代码 #include<iostream> using namespace std; string str, res; int main() { while (cin >> str) { if (str.back() == '.') str.pop_back(); if (str.size() > res.size()) res = str; } cout << res
A #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> using namespace std; typedef long long ll; const int N=1e6+10,INF=1e8; int a[N]; int main() { int t; scanf("%d", &t);
include <bits/stdc++.h> define gcd(a, b) __gcd(a, b) define INF 0x3f3f3f3f3f define eps 1e-6 define PI acos(-1.0) define pb push_back define fst first define sec second define eif else if define de(x) cout << x << ' ' define en
比赛链接: https://codeforces.com/contest/1646 C. Factorials and Powers of Two 题目大意: 求 \(n\) 最少能由几个不同的 powerful 数组成,定义 \(2^d\) 和 d! 都是 powerful 数。 思路: 一个数肯定能由几个 \(2^d\) 组成,而 \(n\) 的数据范围是 1e12,所以我们可以暴力跑出所有 d! ,然