結果

問題 No.3069 Invisible Speedrun
ユーザー pengin_2000
提出日時 2025-03-21 22:03:26
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 237 bytes
コンパイル時間 386 ms
コンパイル使用メモリ 24,704 KB
実行使用メモリ 26,228 KB
平均クエリ数 585.15
最終ジャッジ日時 2025-03-21 22:03:36
合計ジャッジ時間 8,812 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 80
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |         scanf("%d", &n);
      |         ^~~~~~~~~~~~~~~
main.c:13:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   13 |                 scanf("%d", &res);
      |                 ^~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
int main()
{
	int n, res, i;
	scanf("%d", &n);
	for (i = 0; i < 2 * n; i++)
	{
		if (i % 2 > 0)
			printf("D\n");
		else
			printf("R\n");
		fflush(stdout);
		scanf("%d", &res);
		if (res != 0)
			break;
	}
	return 0;
}
0