#include<stdio.h>
int main()
{
int h, m, s;
scanf("%d:%d:%d", &h, &m, &s);
int t;
scanf("%d", &t);
int i = 0, j = 0, k = 0;
if (h >= 10) i = 1;
if (m >= 10) j = 1;
if (s + t >= 10) k = 1;
if (s + t >= 60)
{
m = m + 1;
if (s + t - 60 >= 10) k = 2;
else k = 3;
if (m >= 10) j = 1;
if (m >= 60)
{
j = 2;
h = h + 1;
if (h >= 10) i = 1;
if (h >= 24) i = 2;
}
}
switch (i) {
case 0:printf("0%d:", h); break;
case 1:printf("%d:", h); break;
case 2:printf("00:"); break;
}
switch (j) {
case 0:printf("0%d:", m); break;
case 1:printf("%d:", m); break;
case 2:printf("00:"); break;
}
switch (k) {
case 0:printf("0%d", s + t); break;
case 1:printf("%d", s + t); break;
case 2:printf("%d", s + t - 60); break;
case 3:printf("0%d", s + t - 60); break;
}
}
&&
#include<stdio.h>
int main()
{
int N;
scanf("%d", &N);
double sum = 0.0;
for (int i = 1; i <= N; i++) {
if (1.0 / i < 1e-6)
{
break;
}
sum = sum + 1.0 / i;
}
printf("sum = %.6f", sum);
}