Submission #20545

# Submission time Handle Problem Language Result Execution time Memory
20545 2017-02-12T09:31:51 Z 후시기다네가후시기다네(#73, prion344) 채점 시스템 (OJUZ11_judge) C++
31 / 100
179 ms 2020 KB
#include<iostream>
#include<string>

using namespace std;

int main(void)
{
	int n; cin >> n;

	while (n--)
	{
		string a, b;
		cin >> a >> b;

		if (a.size() >= b.size())
		{
			cout << 0 << endl;
			continue;
		}
		
		int cnt = b.size() - a.size() - 1;
		string tmp;

		for (int i = 0; i < cnt; i ++)
			tmp.insert(0, 1, '0');
		tmp.insert(0, 1, '1');

		a.insert(0, tmp);
		if (a > b)
			cout << cnt << endl;
		else
			cout << cnt + 1 << endl;



	}
}
# Verdict Execution time Memory Grader output
1 Correct 136 ms 2020 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 136 ms 2020 KB Output is correct
2 Correct 119 ms 2020 KB Output is correct
3 Correct 166 ms 2020 KB Output is correct
4 Correct 139 ms 2020 KB Output is correct
5 Correct 106 ms 2020 KB Output is correct
6 Runtime error 93 ms 2020 KB Execution timed out (wall clock limit exceeded)
# Verdict Execution time Memory Grader output
1 Correct 136 ms 2020 KB Output is correct
2 Correct 119 ms 2020 KB Output is correct
3 Correct 166 ms 2020 KB Output is correct
4 Correct 139 ms 2020 KB Output is correct
5 Correct 106 ms 2020 KB Output is correct
6 Runtime error 93 ms 2020 KB Execution timed out (wall clock limit exceeded)
7 Runtime error 133 ms 2020 KB Execution timed out (wall clock limit exceeded)
8 Correct 133 ms 2020 KB Output is correct
9 Correct 146 ms 2020 KB Output is correct
10 Correct 159 ms 2020 KB Output is correct
11 Correct 179 ms 2020 KB Output is correct