結果
| 問題 | No.3454 Zodiac |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2026-02-28 14:06:12 |
| 言語 | Rust (1.93.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 706 bytes |
| 記録 | |
| コンパイル時間 | 754 ms |
| コンパイル使用メモリ | 205,688 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-02-28 14:06:15 |
| 合計ジャッジ時間 | 1,860 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
コンパイルメッセージ
warning: unused import: `std::process::exit` --> src/main.rs:4:5 | 4 | use std::process::exit; | ^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
ソースコード
#![allow(non_snake_case)]
#![allow(dead_code, unused_macros)]
use std::process::exit;
#[allow(unused_imports)]
use proconio::{input, marker::Usize1, marker::Chars};
#[allow(unused_imports)]
use itertools::Itertools;
macro_rules! d {
( $( $x:expr ),* $(,)? ) => {
println!(
concat!( $( stringify!($x), "={:?} " ),* ),
$( $x ),*
);
};
}
fn main() {
input! {
P: i64,
Q: i64,
Y0: i64,
P0: i64,
Q0: i64,
Y: i64,
}
let p = (Y - Y0 + P0).rem_euclid(P);
let q = (Y - Y0 + Q0).rem_euclid(Q);
println!("{} {}",
if p == 0 { P } else { p },
if q == 0 { Q } else { q });
}
norioc