Submission #1182842


Source Code Expand

#include <stdio.h>

int main(void)
{
    int a = 0, b = 0, c = 0,
        d = 0, e = 0, f = 0,
        g = 0, h = 0, M = 0;

    scanf("%d %d %d", &a, &b, &M);

    g = 2*M - b;
    h = 2*M - a;
    f = 3*M - g - h;
    c = 2*M - f;
    e = 3*M - c - h;
    d = 2*M - e;

    printf("%d %d %d\n", a, b, c);
    printf("%d %d %d\n", d, M, e);
    printf("%d %d %d\n", f, g, h);

    return 0;
}

Submission Info

Submission Time
Task D - Magic Square 2
User vjudge1
Language C (GCC 5.4.1)
Score 100
Code Size 394 Byte
Status AC
Exec Time 1 ms
Memory 128 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:9:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d %d", &a, &b, &M);
     ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 76
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All sample_01.txt, sample_02.txt, sample_01.txt, sample_02.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_18.txt, subtask1_19.txt, subtask1_20.txt, subtask1_21.txt, subtask1_22.txt, subtask1_23.txt, subtask1_24.txt, subtask1_25.txt, subtask1_26.txt, subtask1_27.txt, subtask1_28.txt, subtask1_29.txt, subtask1_30.txt, subtask1_31.txt, subtask1_32.txt, subtask1_33.txt, subtask1_34.txt, subtask1_35.txt, subtask1_36.txt, subtask1_37.txt, subtask1_38.txt, subtask1_39.txt, subtask1_40.txt, subtask1_41.txt, subtask1_42.txt, subtask1_43.txt, subtask1_44.txt, subtask1_45.txt, subtask1_46.txt, subtask1_47.txt, subtask1_48.txt, subtask1_49.txt, subtask1_50.txt, subtask1_51.txt, subtask1_52.txt, subtask1_53.txt, subtask1_54.txt, subtask1_55.txt, subtask1_56.txt, subtask1_57.txt, subtask1_58.txt, subtask1_59.txt, subtask1_60.txt, subtask1_61.txt, subtask1_62.txt, subtask1_63.txt, subtask1_64.txt, subtask1_65.txt, subtask1_66.txt, subtask1_67.txt, subtask1_68.txt, subtask1_69.txt, subtask1_70.txt, subtask1_71.txt, subtask1_72.txt
Case Name Status Exec Time Memory
sample_01.txt AC 0 ms 128 KB
sample_02.txt AC 1 ms 128 KB
subtask1_01.txt AC 0 ms 128 KB
subtask1_02.txt AC 0 ms 128 KB
subtask1_03.txt AC 0 ms 128 KB
subtask1_04.txt AC 1 ms 128 KB
subtask1_05.txt AC 0 ms 128 KB
subtask1_06.txt AC 0 ms 128 KB
subtask1_07.txt AC 1 ms 128 KB
subtask1_08.txt AC 0 ms 128 KB
subtask1_09.txt AC 0 ms 128 KB
subtask1_10.txt AC 0 ms 128 KB
subtask1_11.txt AC 0 ms 128 KB
subtask1_12.txt AC 0 ms 128 KB
subtask1_13.txt AC 0 ms 128 KB
subtask1_14.txt AC 0 ms 128 KB
subtask1_15.txt AC 1 ms 128 KB
subtask1_16.txt AC 0 ms 128 KB
subtask1_17.txt AC 0 ms 128 KB
subtask1_18.txt AC 1 ms 128 KB
subtask1_19.txt AC 1 ms 128 KB
subtask1_20.txt AC 0 ms 128 KB
subtask1_21.txt AC 1 ms 128 KB
subtask1_22.txt AC 0 ms 128 KB
subtask1_23.txt AC 0 ms 128 KB
subtask1_24.txt AC 0 ms 128 KB
subtask1_25.txt AC 1 ms 128 KB
subtask1_26.txt AC 0 ms 128 KB
subtask1_27.txt AC 0 ms 128 KB
subtask1_28.txt AC 0 ms 128 KB
subtask1_29.txt AC 0 ms 128 KB
subtask1_30.txt AC 0 ms 128 KB
subtask1_31.txt AC 0 ms 128 KB
subtask1_32.txt AC 0 ms 128 KB
subtask1_33.txt AC 0 ms 128 KB
subtask1_34.txt AC 0 ms 128 KB
subtask1_35.txt AC 0 ms 128 KB
subtask1_36.txt AC 0 ms 128 KB
subtask1_37.txt AC 0 ms 128 KB
subtask1_38.txt AC 0 ms 128 KB
subtask1_39.txt AC 0 ms 128 KB
subtask1_40.txt AC 0 ms 128 KB
subtask1_41.txt AC 0 ms 128 KB
subtask1_42.txt AC 0 ms 128 KB
subtask1_43.txt AC 0 ms 128 KB
subtask1_44.txt AC 0 ms 128 KB
subtask1_45.txt AC 0 ms 128 KB
subtask1_46.txt AC 0 ms 128 KB
subtask1_47.txt AC 0 ms 128 KB
subtask1_48.txt AC 1 ms 128 KB
subtask1_49.txt AC 0 ms 128 KB
subtask1_50.txt AC 0 ms 128 KB
subtask1_51.txt AC 0 ms 128 KB
subtask1_52.txt AC 0 ms 128 KB
subtask1_53.txt AC 1 ms 128 KB
subtask1_54.txt AC 0 ms 128 KB
subtask1_55.txt AC 0 ms 128 KB
subtask1_56.txt AC 0 ms 128 KB
subtask1_57.txt AC 0 ms 128 KB
subtask1_58.txt AC 1 ms 128 KB
subtask1_59.txt AC 0 ms 128 KB
subtask1_60.txt AC 0 ms 128 KB
subtask1_61.txt AC 0 ms 128 KB
subtask1_62.txt AC 1 ms 128 KB
subtask1_63.txt AC 1 ms 128 KB
subtask1_64.txt AC 0 ms 128 KB
subtask1_65.txt AC 0 ms 128 KB
subtask1_66.txt AC 0 ms 128 KB
subtask1_67.txt AC 1 ms 128 KB
subtask1_68.txt AC 1 ms 128 KB
subtask1_69.txt AC 0 ms 128 KB
subtask1_70.txt AC 0 ms 128 KB
subtask1_71.txt AC 1 ms 128 KB
subtask1_72.txt AC 1 ms 128 KB