/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 0ms 520.0 KiB
#2 Wrong Answer 0ms 284.0 KiB

Code

#include <stdio.h>

int main() {
    int t;
    scanf("%d", &t);

    while (t--) {
        int A, B;
        scanf("%d %d", &A, &B);
        
        int i ;
        while (A < B) {
            B % 2 == 0 && B / 2 >= A ? B /= 2 : B--;
            i++;
        }

        printf("%d\n", i);
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1044 Add or multiple
Contest
TLE_Headquarters - round #1
Language
C99 (GCC 13.2.0)
Submit At
2024-03-27 17:16:07
Judged At
2024-11-11 03:37:39
Judged By
Score
0
Total Time
0ms
Peak Memory
520.0 KiB