結果
問題 | No.1070 Missing a space |
ユーザー |
![]() |
提出日時 | 2020-08-05 16:49:15 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 265 bytes |
コンパイル時間 | 10,539 ms |
コンパイル使用メモリ | 401,564 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-17 05:56:34 |
合計ジャッジ時間 | 11,302 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
use std::io::Read;fn main() {let mut s : String = String::new();std::io::stdin().read_to_string(&mut s).ok();let mut ans = -1;for i in s.as_str().chars() {if i == '0' { continue } else { ans += 1 }}println!("{}", ans - 1);}