結果

問題 No.331 CodeRunnerでやれ
ユーザー Leonardone
提出日時 2015-12-24 04:11:56
言語 C90
(gcc 12.3.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 1,064 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 23,552 KB
実行使用メモリ 95,612 KB
平均クエリ数 0.06
最終ジャッジ日時 2024-07-16 22:33:20
合計ジャッジ時間 7,641 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample TLE * 1
other AC * 1 -- * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

/* yukicoder My Practice
 * autoher: Leonarone  NEETSDKASU
 */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>

typedef long long ll;
typedef unsigned long long ull;

void solve(void);
int main(void) { solve(); return 0; }


void solve(void) {
    char str[30] = {0};
    int t = 0;
    
    for (;;) {
        gets(str);
        if (str[0] == 'M') break;
        if (str[3] > 0) {
            puts("F");
        } else {
            switch (t) {
            case 0:
                if (str[0] == '0')  {
                    puts("R");
                } else {
                    puts("F");
                    t = 1;
                }
                break;
            case 1:
                puts("R");
                t = 2;
                break;
            case 2:
                if (str[0] == '0') {
                    puts("L");
                } else {
                    puts("F");
                }
                t = 0;
                break;
            }
        }
        fflush(stdout);
    }
}
0