結果
| 問題 | No.1070 Missing a space |
| コンテスト | |
| ユーザー |
Ichimiya
|
| 提出日時 | 2020-06-10 01:46:24 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 721 bytes |
| 記録 | |
| コンパイル時間 | 1,462 ms |
| コンパイル使用メモリ | 173,492 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-11 15:46:28 |
| 合計ジャッジ時間 | 2,519 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 1 RE * 6 |
ソースコード
#include <bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
int main() {
string C;
cin >> C;
//cout << stoi("01") << endl;
//cout << to_string(1) << endl;
int cnt = 0;
vector<pair<int, int>> v;
for (int i = 1; i < C.size(); i++) {
string s1, s2, s3, s4;
int n1, n2;
s1 = C.substr(0, i);
s2 = C.substr(i, C.size() - i);
//cout << "s1:" << s1 << ' ' << "s2:" << s2 << endl;
n1 = stoi(s1);
n2 = stoi(s2);
//cout << "n1:" << n1 << ' ' << "n2:" << n2 << endl;
s3 = to_string(n1);
s4 = to_string(n2);
//cout << "s3:" << s3 << ' ' << "s4:" << s4 << endl;
if ((s1 != s3) || (s2 != s4)) {
continue;
}
else if ((n1 != 0) && (n2 != 0)) {
cnt++;
}
}
cout << cnt << endl;
}
Ichimiya