Submission #2855566


Source Code Expand

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

typedef long long int int64;

#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)>(0)?(a):-(a))

void run(void){
  int n,s,t;
  scanf("%d%d%d",&n,&s,&t);
  int k=0;
  while(t>s){
    k++;
    t>>=1;
  }
  printf("%d\n",t==s?k:-1);
}

int main(void){
  run();
  return 0;
}

Submission Info

Submission Time
Task B - Camphor Tree
User sansen
Language C (GCC 5.4.1)
Score 100
Code Size 389 Byte
Status AC
Exec Time 1 ms
Memory 128 KB

Compile Error

./Main.c: In function ‘run’:
./Main.c:13:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%d%d",&n,&s,&t);
   ^

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 13
Set Name Test Cases
All 00_sample, 01_sample, 02_sample, max_01, max_02, max_03, max_04, max_05, max_06, max_07, max_08, max_09, min_00
Case Name Status Exec Time Memory
00_sample AC 1 ms 128 KB
01_sample AC 1 ms 128 KB
02_sample AC 1 ms 128 KB
max_01 AC 1 ms 128 KB
max_02 AC 1 ms 128 KB
max_03 AC 1 ms 128 KB
max_04 AC 0 ms 128 KB
max_05 AC 1 ms 128 KB
max_06 AC 0 ms 128 KB
max_07 AC 1 ms 128 KB
max_08 AC 1 ms 128 KB
max_09 AC 1 ms 128 KB
min_00 AC 0 ms 128 KB