Submission #450906


Source Code Expand

import math

a, b, c = map(int, input().split())
ft, low, high = 100, 0, 500
calc = lambda m: a * m + b * math.sin(c * m * math.pi)
for i in range(100):
    mid = (low + high) / 2
    if calc(mid) < ft:
        low = mid
    else:
        high = mid
print(low)

Submission Info

Submission Time
Task D - 高橋君ボール1号
User yumechi
Language Python (3.4.2)
Score 100
Code Size 271 Byte
Status AC
Exec Time 164 ms
Memory 6984 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 17
Set Name Test Cases
Sample example_0.txt, example_1.txt
All example_0.txt, example_1.txt, random_0.txt, random_1.txt, random_2.txt, random_3.txt, random_4.txt, random_5.txt, random_6.txt, random_7.txt, random_8.txt, random_9.txt, special_0.txt, special_1.txt, special_2.txt, example_0.txt, example_1.txt
Case Name Status Exec Time Memory
example_0.txt AC 164 ms 6868 KB
example_1.txt AC 124 ms 6888 KB
random_0.txt AC 121 ms 6868 KB
random_1.txt AC 124 ms 6872 KB
random_2.txt AC 120 ms 6868 KB
random_3.txt AC 121 ms 6872 KB
random_4.txt AC 120 ms 6864 KB
random_5.txt AC 122 ms 6984 KB
random_6.txt AC 123 ms 6984 KB
random_7.txt AC 121 ms 6864 KB
random_8.txt AC 120 ms 6860 KB
random_9.txt AC 121 ms 6864 KB
special_0.txt AC 121 ms 6860 KB
special_1.txt AC 121 ms 6984 KB
special_2.txt AC 124 ms 6984 KB