結果
問題 |
No.8062 A + B
|
ユーザー |
![]() |
提出日時 | 2020-04-01 21:36:15 |
言語 | Rust (1.83.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 474 bytes |
コンパイル時間 | 14,947 ms |
コンパイル使用メモリ | 378,120 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 09:38:40 |
合計ジャッジ時間 | 15,082 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 WA * 2 |
ソースコード
fn run() { let mut s = String::new(); std::io::stdin().read_line(&mut s).unwrap(); let mut it = s.trim().split_whitespace(); let a: i128 = it.next().unwrap().parse().unwrap(); let b: i128 = it.next().unwrap().parse().unwrap(); if b < 0 { println!("{}", a + b); } else { let mut m = 1; while m <= b { m *= 10; } let ans = m * a + b; println!("{}", ans); } } fn main() { run(); }