結果
問題 | No.104 国道 |
ユーザー |
![]() |
提出日時 | 2015-06-06 20:10:32 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 21 ms / 5,000 ms |
コード長 | 476 bytes |
コンパイル時間 | 694 ms |
コンパイル使用メモリ | 105,408 KB |
実行使用メモリ | 25,672 KB |
最終ジャッジ日時 | 2024-07-06 14:31:21 |
合計ジャッジ時間 | 1,814 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yuki { class Program { static void Main(string[] args) { char[] S = Console.ReadLine().ToCharArray(); int r = 1; foreach (var c in S) { if (c == 'L') r *= 2; else r = r * 2 + 1; } Console.WriteLine(r); } } }