跳到正文

个人记录

快读快写模版

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

文章信息

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

版本

  1. v1当前
C++
#include <bits/stdc++.h>
#define int long long
using namespace std;
int n;
inline void read(int &x) {
	x = 0;
	int f = 1;
	char c = getchar();
	while (c < '0' || c > '9') {
		if (c == '-') f = -1;
		c = getchar();
	}
	while ('0' <= c && c <= '9') {
		x = (x << 3) + (x << 1) + (c ^ '0');
		c = getchar();
	}
	x *= f;
}
inline void write(int x) {
	if (x < 0) {
		putchar('-');
		x = -x;
	}
	if (x > 9) write(x / 10);
	putchar(x % 10 + '0');
}
signed main() {
	read(n);
	write(n);
	return 0;
}
原文