結果

問題 No.104 国道
ユーザー Mcpu3
提出日時 2018-07-02 17:27:51
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 176 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 28,032 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-01 01:31:53
合計ジャッジ時間 1,040 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main(void)
{
	char s;
	int n=1;
	while(1){
		scanf("%c",&s);
		if(s=='\n')break;
		else if(s=='L')n*=2;
		else n=n*2+1;
	}
	printf("%d",n);
	return 0;
}
0