結果
| 問題 | No.632 穴埋め門松列 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-04-30 17:18:01 | 
| 言語 | C (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1 ms / 1,000 ms | 
| コード長 | 225 bytes | 
| コンパイル時間 | 152 ms | 
| コンパイル使用メモリ | 27,392 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-27 23:55:48 | 
| 合計ジャッジ時間 | 542 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 | 
コンパイルメッセージ
main.c: In function 'main':
main.c:7:9: warning: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 |         gets(s);
      |         ^~~~
      |         fgets
/usr/bin/ld: /tmp/ccXL8pn4.o: in function `main':
main.c:(.text.startup+0xc): 警告: the `gets' function is dangerous and should not be used.
            
            ソースコード
#include <stdio.h>
int main(void)
{
	char s[6];
	int a;
	gets(s);
	s[5] = 0;
	s[0] == 63 ? a = s[2] == 50 ? 4 : 1 : (a = s[2] == 63 ? 14 : s[4] == 63 ? a = s[2] == 51 ? 1 : 4 : 0);
	printf("%d\n", a);
	return 0;
}
            
            
            
        