Submission #574619


Source Code Expand

#include <stdio.h>
#include <math.h>

double ExchangeHourTo360(int hour, int min)
{
    double angle = (double) hour * 360.0F / 12.0F + (double) min * 30.0F / 60.0F;
    while (angle > 360.0F) {
        angle -= 360.0F;
    }
    return  angle;
}

double ExchangeMinTo360(int min)
{
    return (double) min * 360.0F / 60.0F;
}

int main(int argc, char **argv)
{
    int a, b;
    double angle;
    
    scanf("%d %d", &a, &b);
    angle = fabs(ExchangeHourTo360(a, b) - ExchangeMinTo360(b));
    printf("%.1f\n", (angle > 180.0F) ? 360.0F - angle : angle);

    return 0;
}

Submission Info

Submission Time
Task A - 勝率計算
User kenz2501
Language C++ (GCC 4.9.2)
Score 0
Code Size 602 Byte
Status WA
Exec Time 27 ms
Memory 800 KiB

Compile Error

./Main.cpp: In function ‘int main(int, char**)’:
./Main.cpp:23:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d", &a, &b);
                           ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
WA × 3
WA × 33
Set Name Test Cases
Sample subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt
All 0.txt, 1.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 2.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, 25.txt, 26.txt, 27.txt, 28.txt, 29.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt
Case Name Status Exec Time Memory
0.txt WA 25 ms 792 KiB
1.txt WA 24 ms 800 KiB
10.txt WA 24 ms 792 KiB
11.txt WA 24 ms 796 KiB
12.txt WA 25 ms 796 KiB
13.txt WA 24 ms 784 KiB
14.txt WA 24 ms 792 KiB
15.txt WA 24 ms 792 KiB
16.txt WA 23 ms 792 KiB
17.txt WA 25 ms 788 KiB
18.txt WA 25 ms 700 KiB
19.txt WA 24 ms 792 KiB
2.txt WA 23 ms 792 KiB
20.txt WA 23 ms 792 KiB
21.txt WA 25 ms 676 KiB
22.txt WA 25 ms 792 KiB
23.txt WA 25 ms 788 KiB
24.txt WA 25 ms 792 KiB
25.txt WA 27 ms 724 KiB
26.txt WA 25 ms 788 KiB
27.txt WA 25 ms 788 KiB
28.txt WA 25 ms 788 KiB
29.txt WA 25 ms 796 KiB
3.txt WA 25 ms 792 KiB
4.txt WA 25 ms 792 KiB
5.txt WA 24 ms 644 KiB
6.txt WA 27 ms 792 KiB
7.txt WA 25 ms 792 KiB
8.txt WA 25 ms 788 KiB
9.txt WA 26 ms 792 KiB
subtask0_sample_01.txt WA 24 ms 784 KiB
subtask0_sample_02.txt WA 25 ms 796 KiB
subtask0_sample_03.txt WA 25 ms 788 KiB