結果

問題 No.722 100×100=1000
ユーザー
提出日時 2024-05-29 11:28:58
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 436 bytes
コンパイル時間 15,300 ms
コンパイル使用メモリ 387,176 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-20 21:00:25
合計ジャッジ時間 15,237 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
	let mut s = String::new();
	std::io::stdin().read_line(&mut s).ok();
	let n: Vec<i64> = s.split_whitespace().flat_map(str::parse).collect();
	if n.iter().all(|n| {
		let mut x = n.abs();
		while x != 0 && x % 10 == 0 {
			x /= 10;
		}
		n.abs() > 99 && x > 0 && x < 10
	}) {
		println!("{}", n[0] * n[1] / 10);
		return;
	}
	let a = n[0] * n[1];
	if a.abs() < 100000000 {
		println!("{}", a)
	} else {
		println!("E")
	}
}
0