QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#227093 | #7534. KPI Calculation | Piashy# | WA | 1ms | 4016kb | C++20 | 1.3kb | 2023-10-26 21:50:40 | 2023-10-26 21:50:40 |
Judging History
answer
#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define ll long long
#define ull unsigned long long
#define ld long double
#define sz(a) (int) a.size()
const int inf = (int)1e9;
const ll linf = (ll)2e18;
const ll mod = (ll)1e9 + 7ll;
void solve() {
string s; //cin >> s;
int c = 0;
while (getline(cin, s)) {
int cnt = 0;
for (auto el : s) {
if (el == ' ') ++cnt;
if (el > ' ') break;
}
c += cnt;
}
cout << c;
}
signed main() {
ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
freopen("test.in", "r", stdin);
//freopen("test.in", "w", stdout);
//cout << fixed << setprecision(7);
//clock_t start = clock();
int tet = 1;
//cin >> tet;
while (tet--) {
solve();
}
//clock_t end = clock();
//ld seconds = (ld)(end - start) / CLOCKS_PER_SEC;
//cout << seconds << "\n";
}
详细
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 4016kb
input:
#include <cstdio> int main() { int a,b; scanf ("%d%d",&a,&b); printf ("%d\n",a+b); return 0; }
output:
0
result:
wrong answer expected '10', found '0'