結果
問題 |
No.8062 A + B
|
ユーザー |
![]() |
提出日時 | 2020-04-01 21:44:48 |
言語 | Rust (1.83.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 527 bytes |
コンパイル時間 | 13,479 ms |
コンパイル使用メモリ | 391,184 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 10:15:44 |
合計ジャッジ時間 | 14,257 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 1 |
ソースコード
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 s: Vec<char> = it.next().unwrap().chars().collect(); let b: i128 = s.iter().cloned().collect::<String>().parse().unwrap(); if s[0] == '-' { println!("{}", a + b); } else { let m = 10i128.pow(s.len() as u32); let ans = m * a + b; println!("{}", ans); } } fn main() { run(); }