Submission #20578

# Submission time Handle Problem Language Result Execution time Memory
20578 2017-02-12T12:45:25 Z 키-파(#75, kipa00) 채점 시스템 (OJUZ11_judge) C++
0 / 100
1000 ms 1116 KB
#include <cstdio>

using namespace std;

int main() {
    int n;
    scanf("%d", &n);
    while (n--) {
        int t, p;
        scanf("%d%d", &t, &p);
        int temp = t, p10 = 1;
        while (temp > 0) {
            p10 *= 10;
            temp /= 10;
        }
        int c = 0;
        while (p10 + t <= p) {
            ++c;
            p10 *= 10;
        }
        printf("%d\n", c);
    }
    return 0;
}

Compilation message

judge.cpp: In function 'int main()':
judge.cpp:7:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &n);
                    ^
judge.cpp:10:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d", &t, &p);
                              ^
# Verdict Execution time Memory Grader output
1 Incorrect 29 ms 1116 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 29 ms 1116 KB Output isn't correct
2 Incorrect 36 ms 1116 KB Output isn't correct
3 Incorrect 36 ms 1116 KB Output isn't correct
4 Incorrect 33 ms 1116 KB Output isn't correct
5 Incorrect 33 ms 1116 KB Output isn't correct
6 Incorrect 33 ms 1116 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 29 ms 1116 KB Output isn't correct
2 Incorrect 36 ms 1116 KB Output isn't correct
3 Incorrect 36 ms 1116 KB Output isn't correct
4 Incorrect 33 ms 1116 KB Output isn't correct
5 Incorrect 33 ms 1116 KB Output isn't correct
6 Incorrect 33 ms 1116 KB Output isn't correct
7 Execution timed out 1000 ms 1116 KB Execution timed out
8 Execution timed out 1000 ms 1116 KB Execution timed out
9 Execution timed out 1000 ms 1116 KB Execution timed out
10 Execution timed out 1000 ms 1116 KB Execution timed out
11 Execution timed out 1000 ms 1116 KB Execution timed out