結果
問題 | No.104 国道 |
ユーザー |
![]() |
提出日時 | 2015-09-02 11:36:53 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 308 bytes |
コンパイル時間 | 149 ms |
コンパイル使用メモリ | 19,840 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-18 17:48:59 |
合計ジャッジ時間 | 816 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
#include <stdio.h>#include <string.h>int main(void){long ans = 1;char s;while(1){s = getchar();if(s=='L'){ans *= 2;}else if(s=='R'){ans = 2*ans + 1;}else{printf("%ld\n", ans);return 0;}}}