結果

問題 No.1198 お菓子配り-1
ユーザー ixTL255
提出日時 2022-12-28 23:03:57
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 15,905 ms
コンパイル使用メモリ 380,368 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-24 01:25:24
合計ジャッジ時間 17,352 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    let n: u128 = s.trim().parse().unwrap();

	if n == 1 || n == 4 {
		println!("{}", -1);
	} else if n % 4 == 2 {
		println!("{}", -1);
	} else{
		println!("{}", 1);
	}
}
0