Submission #20545

#TimeUsernameProblemLanguageResultExecution timeMemory
20545후시기다네가후시기다네 (#35)채점 시스템 (OJUZ11_judge)C++98
31 / 100
179 ms2020 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...