結果
問題 | No.668 6.0*10^23 |
ユーザー |
|
提出日時 | 2018-09-29 00:06:43 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 552 bytes |
コンパイル時間 | 16,211 ms |
コンパイル使用メモリ | 379,440 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-01 04:42:20 |
合計ジャッジ時間 | 15,721 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
#![allow(non_snake_case)]use std::collections::{ VecDeque };use std::io;fn main() {let mut S = String::new();io::stdin().read_line(&mut S).unwrap();let S = S.trim();let mut v: VecDeque<_> = S.chars().map(|c| c.to_digit(10).unwrap()).collect();if v[2] >= 5 {v[1] += 1;}for i in 2..v.len() {v[i] = 0;}if v[1] == 10 {v[1] = 0;v[0] += 1;}if v[0] == 10 {v[0] = 0;v.push_front(1);}println!("{}.{}*10^{}", v[0], v[1], v.len()-1);}