跳到正文

休闲·娱乐

A+B Problem使用类的做法

liruiyao_0329约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月27日
更新
2025年12月27日
篇幅
约 1 分钟

版本

  1. v1当前

神秘的C++类写法

A+B竟然AC了?

C++
#include <iostream>
using namespace std;
class exercise {
	public:
		int cise(long long a,long long b){
			return a + b;
		}
};
int main(){
	long long a,b;
	cin >> a >> b;
	exercise l;
	cout << l.cise(a,b);
	//cout << c;
}
原文