반응형
Baekjoon Online Judge의 31450번 Everyone is a winner 문제의 Rust 풀이입니다.
31450번: Everyone is a winner
Your friend is a kindergarten teacher. Since the Olympic Games in Paris are approaching, he wants to teach the kids about different aspects of sports competitions. As part of this idea, he plans to have one day when kids receive medals for their behaviour...
www.acmicpc.net
💻코드
use std::io;
fn main() {
let mut input = String::new();
io::stdin().read_line(&mut input).unwrap();
let nums: Vec<i32> = input
.trim()
.split_whitespace()
.map(|num| num.parse().unwrap())
.collect();
if nums[0] % nums[1] == 0 {
println!("Yes");
} else {
println!("No");
}
}
🧠풀이
두 수를 입력받아 나누어지는지 확인하면 되는 간단한 문제다.
🤔느낀 점
러스트로 한번 풀어봤는데 그냥 파이썬으로 푸는게 편하긴 할 것같다...
![[백준/Rust] (B5) Everyone is a winner - 31450 - Baekjoon Online Judge의 31450번 Everyone is a winner 문제의 Rust 풀이입니다. - 모든 영역 [백준/Rust] (B5) Everyone is a winner - 31450 - Baekjoon Online Judge의 31450번 Everyone is a winner 문제의 Rust 풀이입니다. - 모든 영역](https://blog.kakaocdn.net/dna/64gXn/btsFBJx0B8y/AAAAAAAAAAAAAAAAAAAAAHpgr6XoIjPH4E-Zo5JlRidWfJGZN8AyLdOOIvAFXN8s/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&expires=1759244399&allow_ip=&allow_referer=&signature=UFZEoYUed5KIKenfWT9TaqxNTE4%3D)
반응형
댓글