็ตๆ
ๅ้ก | No.8077 ๐ง |
ใฆใผใถใผ |
![]() |
ๆๅบๆฅๆ | 2021-04-01 21:55:42 |
่จ่ช | Rust (1.83.0 + proconio) |
็ตๆ |
AC
|
ๅฎ่กๆ้ | 1 ms / 2,000 ms |
ใณใผใ้ท | 3,081 bytes |
ใณใณใใคใซๆ้ | 14,780 ms |
ใณใณใใคใซไฝฟ็จใกใขใช | 389,180 KB |
ๅฎ่กไฝฟ็จใกใขใช | 6,820 KB |
ๆ็ตใธใฃใใธๆฅๆ | 2024-12-21 06:15:04 |
ๅ่จใธใฃใใธๆ้ | 13,402 ms |
ใธใฃใใธใตใผใใผID ๏ผๅ่ๆ ๅ ฑ๏ผ |
judge2 / judge4 |
๏ผ่ฆใญใฐใคใณ๏ผ
ใใกใคใซใใฟใผใณ | ็ตๆ |
---|---|
sample | AC * 3 |
other | AC * 10 |
ใฝใผในใณใผใ
#![allow(unused_macros)]#![allow(dead_code)]#![allow(unused_imports)]// # ใใกใคใซๆงๆ// - use ๅฎฃ่จ// - lib ใขใธใฅใผใซ// - main ้ขๆฐ// - basic ใขใธใฅใผใซ//// ๅธธใซไฝฟใใใณใใฌใผใใฉใคใใฉใชใฏ basic ใขใธใฅใผใซๅ ใซใใใพใใ// ๅ้กใซๅฟใใฆไฝฟใใฉใคใใฉใช lib ใขใธใฅใผใซๅ ใซใณใใใใฆใใพใใ// ใฉใคใใฉใชใฎใณใผใใฏใใกใ โ https://github.com/RheoTommy/at_coder// Twitter ใฏใใกใ โ https://twitter.com/RheoTommyuse std::collections::*;use std::io::{stdout, BufWriter, Write};use crate::basic::*;use crate::lib::*;use std::f64::consts::PI;pub mod lib {}fn main() {let mut sc = Scanner::new();let a = sc.next_int();let b = sc.next_int();let c = sc.next_int();let d = sc.next_int();let e = sc.next_int();let ans = (a * b + c - d) % e + e;println!("{}", ans % e);}pub mod basic {pub const U_INF: u64 = (1 << 60) + (1 << 30);pub const I_INF: i64 = (1 << 60) + (1 << 30);pub struct Scanner {buf: std::collections::VecDeque<String>,reader: std::io::BufReader<std::io::Stdin>,}impl Scanner {pub fn new() -> Self {Self {buf: std::collections::VecDeque::new(),reader: std::io::BufReader::new(std::io::stdin()),}}fn scan_line(&mut self) {use std::io::BufRead;let mut flag = 0;while self.buf.is_empty() {let mut s = String::new();self.reader.read_line(&mut s).unwrap();let mut iter = s.split_whitespace().peekable();if iter.peek().is_none() {if flag >= 5 {panic!("There is no input!");}flag += 1;continue;}for si in iter {self.buf.push_back(si.to_string());}}}pub fn next<T: std::str::FromStr>(&mut self) -> T {self.scan_line();self.buf.pop_front().unwrap().parse().unwrap_or_else(|_| panic!("Couldn't parse!"))}pub fn next_usize(&mut self) -> usize {self.next()}pub fn next_int(&mut self) -> i64 {self.next()}pub fn next_uint(&mut self) -> u64 {self.next()}pub fn next_chars(&mut self) -> Vec<char> {self.next::<String>().chars().collect()}pub fn next_string(&mut self) -> String {self.next()}pub fn next_char(&mut self) -> char {self.next()}pub fn next_float(&mut self) -> f64 {self.next()}pub fn next_vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {(0..n).map(|_| self.next()).collect::<Vec<_>>()}}}