結果
| 問題 |
No.671 1000000007
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-20 14:47:08 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 788 bytes |
| コンパイル時間 | 1,301 ms |
| コンパイル使用メモリ | 158,940 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 14:40:45 |
| 合計ジャッジ時間 | 1,874 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 6 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string s, t = "1000000007";
//100000000007
int ans = 0;
cin >> s;
if (s.size() == t.size())
for (int i = 0; i < t.size(); i++) {
if (s[i] != t[i] && t[i] == '0')
ans++;
}
if (s.size() > t.size())
for (int i = 0; i < s.size(); i++) {
if (s[i] != t[i] && s[i] == '0')
ans++;
}
if (s.size() < t.size())
for (int i = 0; i < s.size(); i++) {
if (s[i] != t[i] && t[i] == '0')
ans++;
}
cout << ans << endl;
return 0;
}