---
# System prepended metadata

title: '題解 zerojudge c290: APCS 2017-0304-1秘密差'
tags: [APCS, c++]

---

###### tags: `APCS` `c++`
# 題解 zerojudge c290: APCS 2017-0304-1秘密差
```cpp=
#include<bits/stdc++.h>
using namespace std;
int main(){
	int A=0,B=0;
	string s;
	cin>>s;
	
	for(int i=0;i<s.size();i=i+2)	A+=s[i]-'0';
	for(int i=1;i<s.size();i=i+2)	B+=s[i]-'0';
	
	cout<<abs(A-B);
}

```