Submission #7558412


Source Code Expand

Copy
  #include <bits/stdc++.h>


  #define en "\n"
  #define sqrt(n) sqrt((long double) n)
  #define all(c) (c).begin() , (c).end()
  #define MOD 1000000007
  #define mem(a) memset(a,0,sizeof(a))
  #define flash() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
  #define file_input(name) name!=""?freopen(name".in","r",stdin),freopen(name".out","w",stdout):0
  #define SORT(x) sort(all(x))
  #define REVERSE(x) reverse(all(x))


  using namespace std;

  typedef unsigned long long ull;
  typedef long long ll;
  typedef pair<int, int> pii;
  typedef pair<ll, ll> pll;
  typedef vector<int> vi;
  typedef set<int> seti;
  typedef pair<double, double> pdd;
  typedef long double ld;



  const double EPS=0.000000001;
  const double INFD32=1000000000;
  const ll INF64=1000000000000000000;
  const int INF32=1000000000;

  #define maxN 30000000
  bool check(int x){
    int digit;
    while(x){
      digit=x%10;
      x/=10;
      if(digit<2)return false;
    }
    return true;
  }
  signed main(void){
      int m,d;
      cin>>m>>d;
      int cnt=0;
      int digit10,digit1;
      for(int i=22;i<=d;i++){
       if(check(i)){
         digit10=i/10;
         digit1=i%10;
       }
       if(digit10*digit1<=m) cnt++;
      }
      cout<<cnt;
      return 0;
    }

Submission Info

Submission Time
Task A - Takahashi Calendar
User Godspeed
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1327 Byte
Status
Exec Time 1 ms
Memory 256 KB

Test Cases

Set Name Score / Max Score Test Cases
All 0 / 200 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 0 / 0 sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
sample_01 1 ms 256 KB
sample_02 1 ms 256 KB
sample_03 1 ms 256 KB
testcase_01 1 ms 256 KB
testcase_02 1 ms 256 KB
testcase_03 1 ms 256 KB
testcase_04 1 ms 256 KB
testcase_05 1 ms 256 KB
testcase_06 1 ms 256 KB
testcase_07 1 ms 256 KB
testcase_08 1 ms 256 KB
testcase_09 1 ms 256 KB
testcase_10 1 ms 256 KB