QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#227093#7534. KPI CalculationPiashy#WA 1ms4016kbC++201.3kb2023-10-26 21:50:402023-10-26 21:50:40

Judging History

你现在查看的是最新测评结果

  • [2023-10-26 21:50:40]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:4016kb
  • [2023-10-26 21:50:40]
  • 提交

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'