結果
問題 | No.104 国道 |
ユーザー |
|
提出日時 | 2020-03-27 00:39:52 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 27 ms / 5,000 ms |
コード長 | 346 bytes |
コンパイル時間 | 885 ms |
コンパイル使用メモリ | 113,456 KB |
実行使用メモリ | 27,460 KB |
最終ジャッジ日時 | 2025-01-02 07:43:55 |
合計ジャッジ時間 | 2,306 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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.Linq; public class P0104 { public static void Main() { var s = Console.ReadLine().ToCharArray(); s = s.Reverse().ToArray(); var result = 1 << s.Length; for(int i=0; i<s.Length; i++) { if(s[i] == 'R') result += 1 << i; } Console.WriteLine(result); } }