結果
| 問題 | No.104 国道 |
| コンテスト | |
| ユーザー |
rustGanbaruman
|
| 提出日時 | 2026-02-05 19:30:09 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 0 ms / 5,000 ms |
| + 832µs | |
| コード長 | 330 bytes |
| 記録 | |
| コンパイル時間 | 319 ms |
| コンパイル使用メモリ | 174,268 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-21 02:27:26 |
| 合計ジャッジ時間 | 2,196 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
use std::io::{Read, self};
fn main(){
let mut lr = String::new();
io::stdin().read_to_string(&mut lr).unwrap();
let mut number = 1;
for i in lr.chars(){
if i == 'L'{
number *= 2
}else if i == 'R'{
number = number * 2 + 1;
}
}
println!("{}",number)
}
rustGanbaruman