結果
問題 |
No.671 1000000007
|
ユーザー |
![]() |
提出日時 | 2018-04-19 21:18:51 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 468 bytes |
コンパイル時間 | 728 ms |
コンパイル使用メモリ | 73,432 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 04:53:00 |
合計ジャッジ時間 | 1,445 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <iterator> #include <array> #include <map> #include <stack> #include <queue> #include <set> #include <cmath> using namespace std; int numOfZero(string s) { int counter = 0; for (auto x : s) { if (x == '0') { counter += 1; } } return counter; } int main() { string N; cin >> N; cout << abs(numOfZero("1000000007") - numOfZero(N)) << "\n"; }