Submission #163178


Source Code Expand

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>

#define FALSE 0
#define TRUE 1

int max(int a,int b){return a>b?a:b;}
int min(int a,int b){return a<b?a:b;}

long long int canuse(long long int a)
{
  if(a<4) return a;
  if(4<=a && a<9) return a-1;
  return canuse(a/10)*8+canuse(a%10));
}
int main(void)
{
  long long int a,b;
  scanf("%lld %lld",&a,&b);
  printf("%d\n",((a-1)-canuse(a-1))-(b-canuse(b)));
  return 0;
}

Submission Info

Submission Time
Task D - 禁止された数字
User siotouto
Language C++ (G++ 4.6.4)
Score 0
Code Size 470 Byte
Status CE

Compile Error

./Main.cpp: In function ‘long long int canuse(long long int)’:
./Main.cpp:16:37: error: expected ‘;’ before ‘)’ token
./Main.cpp:16:37: error: expected primary-expression before ‘)’ token
./Main.cpp:16:37: error: expected ‘;’ before ‘)’ token
./Main.cpp: In function ‘int main()’:
./Main.cpp:22:50: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat]
./Main.cpp:21:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]