#include<cstdio>
#include<cmath>
using namespace std;
int main() {
int s, v;
scanf("%d%d", &s, &v);
int t_walk = ceil(1.0 * s / v) + 10;
int from_zero = 60 * (24 + 8) - t_walk;
int hh = (from_zero / 60) % 24;
int mm = from_zero % 60;
printf("%02d:%02d", hh, mm);
return 0;
}
#include<cstdio>
using namespace std;
int main() {
float a = 0.1;
printf("%.f", int(2 - a * a * 100));
//printf("%.10f", 2 - a * a * 100);
return 0;
}
#include<iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << (a > b) << ' ';
cout << (a <= b) << ' ';
cout << (a != b) << endl;
return 0;
}
#include<iostream>
using namespace std;
int main() {
int x; bool p1, p2;
cin >> x;
p1 = x % 2 == 0;
p2 = 4 < x && x <= 12;
cout << (p1 && p2) << ' ';
cout << (p1 || p2) << ' ';
cout << (p1 ^ p2) << ' ';
cout << !(p1 || p2) << endl;
}
#include<bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
double a[N];
int main() {
int t;
cin >> t;
while (t--){
int n;
int k;
scanf("%d %d", &n, &k);
double total = 0;
for (int i = 0; i < n; i++){
scanf("%lf", &a[i]);
total += a[i];
}
for (int i = 0; i < n; i++){
double e = a[i] + (a[i] * 1.0 / total * k);
printf("%.10f ", e);
}
cout << endl;
}
return 0;
}
/*#include<iostream>
using namespace std;
int main() {
int x; bool p1, p2, p3, p4;
cin >> x;
p1 = x % 4 == 0;
p2 = x % 100 == 0;
p3 = x % 400 == 0;
p4 = p3 || p1 && !p2;
cout << p4 << endl;
return 0;
}*/
#include<iostream>
using namespace std;
int main () {
int x; bool p;
cin >> x;
//p = (x % 400 == 0) || (x % 4 == 0) && !(x % 100 == 0);
p = !(x % 400) || !(x % 4) && (x % 100);
cout << p << endl;
return 0;
}
C++入门同步记录#5
最新推荐文章于 2024-04-29 22:13:34 发布