mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 18:31:59 +00:00
P6500 [COCI2010-2011#3] ZBROJ
R39634200
This commit is contained in:
parent
94f1ba668f
commit
f3fdb0ad30
20
problem/P6500/P6500.cpp
Normal file
20
problem/P6500/P6500.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
// R39634200
|
||||
|
||||
#include<bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
string a, b, a_max, b_max, a_min, b_min;
|
||||
cin >> a >> b;
|
||||
for(int i = 0 ; i < a.size() ; i++) {
|
||||
if(a[i] == '6' || a[i] == '5') a_max += '6', a_min += '5';
|
||||
else a_max += a[i], a_min += a[i];
|
||||
}
|
||||
for(int i = 0 ; i < b.size() ; i++) {
|
||||
if(b[i] == '6' || b[i] == '5') b_max += '6', b_min += '5';
|
||||
else b_max += b[i], b_min += b[i];
|
||||
}
|
||||
cout << atoi(a_min.c_str()) + atoi(b_min.c_str()) << ' ' << atoi(a_max.c_str()) + atoi(b_max.c_str()) << endl;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user