一个最多,一个最少。 最少代码:

#include<bits/stdc++.h>
using namespace std;int main(){int a,b;cin>>a>>b;cout<<a+b;}

最多代码:


```cpp
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <istream>
#include <ostream>
#include <streambuf>
#include <utility>
using namespace std;
typedef int MyIntType;
const int ZERO_CONSTANT = 0;
const int ONE_CONSTANT = 1;
const int TWO_CONSTANT = 2;
MyIntType get_first_integer();
MyIntType get_second_integer();
MyIntType calculate_sum(MyIntType num1, MyIntType num2);
void print_result(MyIntType result_value);
MyIntType get_first_integer(){
    MyIntType input_number_1;
    cin >> input_number_1;
    return input_number_1;
}
MyIntType get_second_integer(){
    MyIntType input_number_2;
    cin >> input_number_2;
    return input_number_2;
}
MyIntType calculate_sum(MyIntType num1, MyIntType num2){
    MyIntType total_sum = num1 + num2;
    return total_sum;
}
void print_result(MyIntType result_value){
    cout << result_value << endl;
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    MyIntType first_value = get_first_integer();
    MyIntType second_value = get_second_integer();
    MyIntType final_result = calculate_sum(first_value, second_value);
    print_result(final_result);
    return ZERO_CONSTANT;
}

2 条评论

  • 1

信息

ID
806
时间
ms
内存
MiB
难度
2
标签
递交数
29
已通过
21
上传者