https://github.com/azruine/rust-ps
https://github.com/azruine/rust-ps
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/azruine/rust-ps
- Owner: Azruine
- Created: 2024-03-05T13:36:17.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-02T01:14:13.000Z (over 1 year ago)
- Last Synced: 2025-04-02T02:23:48.213Z (over 1 year ago)
- Language: Rust
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rust로 백준 풀어보기
이게 뭘까
## 세팅
|**Software**|**Version**|
|---|---|
|**OS**|**Debian 11 bullseye**|
|**Cargo**|**1.85.1**|
src에 있는 main.rs 파일에 코드를 작성한 뒤, f5를 눌러 실행시키면 io/main.input.txt 에 있는 내용을 stdin으로 입력받은 뒤, output.txt에 stdout으로 출력한다.
## Rust 입출력
```rust
use std::io::Write;
fn main()
{
let mut a: String = String::new();
std::io::stdin().read_line(&mut a).expect("Read failed");
let stdout = std::io::stdout();
let mut out = std::io::BufWriter::new(stdout.lock());
writeln!(out, "{}", a)
}
```