Submission #3051928


Source Code Expand

#include<bits/stdc++.h>
using namespace std;
int main()
{ 
    long long a,b;
    scanf("%d%d",&a,&b);
    if(a%b!=0)printf("%d",&a);
    else printf("-1");
    puts("");
    return 0;
}

Submission Info

Submission Time
Task A - Two Integers
User luogu_bot1
Language C++ (GCC 5.4.1)
Score 0
Code Size 186 Byte
Status WA
Exec Time 1 ms
Memory 256 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:6:23: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long long int*’ [-Wformat=]
     scanf("%d%d",&a,&b);
                       ^
./Main.cpp:6:23: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long long int*’ [-Wformat=]
./Main.cpp:7:29: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int*’ [-Wformat=]
     if(a%b!=0)printf("%d",&a);
                             ^
./Main.cpp:6:24: 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 × 2
AC × 3
WA × 11
Set Name Test Cases
Sample 0_000.txt, 0_001.txt
All 0_000.txt, 0_001.txt, 1_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt, 1_012.txt, 1_013.txt
Case Name Status Exec Time Memory
0_000.txt WA 1 ms 256 KB
0_001.txt WA 1 ms 256 KB
1_002.txt AC 1 ms 256 KB
1_003.txt WA 1 ms 256 KB
1_004.txt AC 1 ms 256 KB
1_005.txt AC 1 ms 256 KB
1_006.txt WA 1 ms 256 KB
1_007.txt WA 1 ms 256 KB
1_008.txt WA 1 ms 256 KB
1_009.txt WA 1 ms 256 KB
1_010.txt WA 1 ms 256 KB
1_011.txt WA 1 ms 256 KB
1_012.txt WA 1 ms 256 KB
1_013.txt WA 1 ms 256 KB
for_sample.txt WA 1 ms 256 KB