Submission #7121397
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
using LL = long long; using PII = pair<LL, LL>; using VI = vector<LL>; using VVI = vector<VI>;
using VB = vector<bool>; using VS = vector<string>; using VP = vector<PII>;
#define VV(T) vector<vector<T>>
#define PB push_back
#define MP make_pair
#define SZ(a) LL((a).size())
#define EACH(x, c) for (auto x : (c))
#define ALL(c) (c).begin(), (c).end()
#define REVERSE(c) reverse(ALL(c))
#define SORT(c) stable_sort(ALL(c))
#define RSORT(c) stable_sort((c).rbegin(), (c).rend())
#define FOR(i, a, b) for (LL i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define $(x) {cout << #x << " = " << (x) << endl;}
void solve(LL M, LL D){
LL ans = 0;
FOR(m, 1, M + 1) {
FOR(d, 1, D + 1) {
LL d1 = d % 10;
LL d10 = d / 10;
if (d1 >= 2 && d10 >= 2 && d1 * d10 == m) {
ans++;
}
}
}
cout << ans << endl;
}
int main(){
LL M;
scanf("%lld",&M);
LL D;
scanf("%lld",&D);
solve(M, D);
return 0;
}
Submission Info
Submission Time
2019-08-24 22:55:36+0900
Task
A - Takahashi Calendar
User
yetnone
Language
C++14 (GCC 5.4.1)
Score
200
Code Size
1115 Byte
Status
AC
Exec Time
1 ms
Memory
256 KiB
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:35:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld",&M);
^
./Main.cpp:37:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld",&D);
^
Judge Result
Set Name
All
Sample
Score / Max Score
200 / 200
0 / 0
Status
Set Name
Test Cases
All
sample_01, sample_02, sample_03, testcase_01, testcase_02, testcase_03, testcase_04, testcase_05, testcase_06, testcase_07, testcase_08, testcase_09, testcase_10
Sample
sample_01, sample_02, sample_03
Case Name
Status
Exec Time
Memory
sample_01
AC
1 ms
256 KiB
sample_02
AC
1 ms
256 KiB
sample_03
AC
1 ms
256 KiB
testcase_01
AC
1 ms
256 KiB
testcase_02
AC
1 ms
256 KiB
testcase_03
AC
1 ms
256 KiB
testcase_04
AC
1 ms
256 KiB
testcase_05
AC
1 ms
256 KiB
testcase_06
AC
1 ms
256 KiB
testcase_07
AC
1 ms
256 KiB
testcase_08
AC
1 ms
256 KiB
testcase_09
AC
1 ms
256 KiB
testcase_10
AC
1 ms
256 KiB