#P339A. Helpful Maths Description Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation. The teacher has written down the sum of multiple numbers. Pupils should calculate the sum. To make the calculation easier, the sum only c...
The teacher has written down the sum of multiple numbers. Pupils should calculate the sum. To make the calculation easier, the sum only contains numbers 1, 2 and 3. Still, that isn't enough for Xenia. She is only beginning to count, so she can calculate a sum only if the summands f...
You've got the sum that was written on the board. Rearrange the summans and print the sum in such a way that Xenia can calculate the sum. Input The first line contains a non-empty strings— the sum Xenia needs to count. Stringscontains no spaces. It only contains digits and characters...
CodeForces 339 A.Helpful Maths(水~) Description 给出一个1,2,3的求和式,要求把被加数排完序后输出该求和式 Input 一个1,2,3的求和式s,串长不超过100 Output 输出有序的求和式 Sample Input 1+1+3+1+3 Sample Output 1+1+1+3+3 Solution 水题,把数字拿出来排个序然后从小到大输出即可 Code.....
codeforces水题100道 第二十五题 Codeforces Round #197 A. Helpful Maths (Div. 2) (strings) 题目链接:http://www.codeforces.com/problemset/problem/339/A 题意:重新组合加法字符串,使得按照1,2,3的顺序进行排列。 C++代码: C++
Codeforces Round #197 (Div. 2) A. Helpful Maths bfsof 一只退役蒟蒻ACMer(考研备考) 创作声明: 内容包含剧透 水题 #include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll arr[1000],a=0; string s; cin>>s; for(ll i=0;i='0'&&s[i]<='9') arr[a+...
Codeforces Round #197 (Div. 2) A. Helpful Maths【字符串/给一个连加计算式,只包含数字 1、2、3,要求重新排序,使得连加的数字从小到大】,A.HelpfulMathstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputXeniathebeginn
A. Helpful Maths time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation. ...
[ An Ac a Day ^_^ ] CodeForces 339A Helpful Maths 熄灯了才想起来没写博客 赶紧水一道题碎觉…… 1#include<stdio.h>2#include<iostream>3#include<algorithm>4#include<math.h>5#include<string.h>6#include<string>7#include8#include<set>9#include<vector>10#include<queue>11#defineM(a,b) ...
A.题意就是把字符串里面的数字按增序排列,直接上代码。 #include <string.h> #include <stdio.h> #include <algorithm> using namespace std; int main() { char s[1005]; int num[105]; while (scanf("%s" , s) != EOF) { int l = strlen(s); ...