Submission #1693362


Source Code Expand

#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <cmath>

using namespace std;

#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, n)	 for(int i = 0; i < (n); i++)
#define all(a)		 begin(a), end(a)

typedef long long int		   ll;
typedef long long unsigned int llu;

void solve(ll n, ll m) {
	printf("%d", (m - 1) * (n - 1));
}

int main() {
	ll m;
	ll n;
	scanf("%lld", &n);
	scanf("%lld", &m);
	solve(n, m);
	return 0;
}

Submission Info

Submission Time
Task A - K-City
User noni
Language C++14 (GCC 5.4.1)
Score 100
Code Size 590 Byte
Status AC
Exec Time 1 ms
Memory 128 KB

Compile Error

./Main.cpp: In function ‘void solve(ll, ll)’:
./Main.cpp:22:32: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘ll {aka long long int}’ [-Wformat=]
  printf("%d", (m - 1) * (n - 1));
                                ^
./Main.cpp: In function ‘int main()’:
./Main.cpp:28:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld", &n);
                   ^
./Main.cpp:29:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld", &m);
                   ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 10
Set Name Test Cases
Sample 0_00.txt, 0_01.txt
All 0_00.txt, 0_01.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt
Case Name Status Exec Time Memory
0_00.txt AC 0 ms 128 KB
0_01.txt AC 0 ms 128 KB
1_00.txt AC 0 ms 128 KB
1_01.txt AC 1 ms 128 KB
1_02.txt AC 1 ms 128 KB
1_03.txt AC 0 ms 128 KB
1_04.txt AC 0 ms 128 KB
1_05.txt AC 1 ms 128 KB
1_06.txt AC 1 ms 128 KB
1_07.txt AC 0 ms 128 KB