Submission #887533

# Submission time Handle Problem Language Result Execution time Memory
887533 2023-12-14T17:28:58 Z rainboy Cooking (innopolis2018_final_B) C
0 / 100
0 ms 348 KB
#include <stdio.h>

int main() {
	long long k, d, t, ans2;

	scanf("%lld%lld%lld", &k, &d, &t), d *= (k + d - 1) / d, t *= 2;
	ans2 = t / (k + d) * d * 2 + (t % (k + d) <= k * 2 ? t % (k + d) : (t - k) * 2);
	printf("%lld.%d\n", ans2 / 2, ans2 % 2 == 0 ? 0 : 5);
	return 0;
}

Compilation message

B.c: In function 'main':
B.c:6:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    6 |  scanf("%lld%lld%lld", &k, &d, &t), d *= (k + d - 1) / d, t *= 2;
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Incorrect 0 ms 348 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Incorrect 0 ms 348 KB Output isn't correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Incorrect 0 ms 348 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Incorrect 0 ms 348 KB Output isn't correct
5 Halted 0 ms 0 KB -