結果

問題 No.104 国道
ユーザー HaijinnHaijinn
提出日時 2017-01-04 20:13:47
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 322 bytes
コンパイル時間 1,130 ms
コンパイル使用メモリ 23,596 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-22 18:54:14
合計ジャッジ時間 2,899 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 0 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 0 ms
4,376 KB
testcase_08 AC 0 ms
4,384 KB
testcase_09 AC 0 ms
4,376 KB
testcase_10 AC 0 ms
4,380 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 0 ms
4,376 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 0 ms
4,380 KB
testcase_16 AC 0 ms
4,380 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 1 ms
4,376 KB
testcase_19 AC 0 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:17:4: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
  x=strlen(s);
    ^~~~~~
main.c:17:4: warning: incompatible implicit declaration of built-in function ‘strlen’
main.c:17:4: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
main.c:2:1:
+#include <string.h>
 
main.c:17:4:
  x=strlen(s);
    ^~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void)
{
	int b=1;
	long long a;
	long long a2;
	int f=0;
	int l;
	char s[100];
	char s2[100];
	char m;
	char n;
	int x;
	int i;
	scanf("%s",s);
	x=strlen(s);
	
	for(i=0;i<x;i++){
		if(s[i]=='R'){
		b=b*2+1;
		}else if(s[i]=='L'){
			
			b*=2;
		}
		
		
		
		
	}
	printf("%d\n",b);
	return 0;
}
0