結果
問題 | No.587 七対子 |
ユーザー | Mcpu3 |
提出日時 | 2018-06-21 16:08:13 |
言語 | C (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 347 bytes |
コンパイル時間 | 127 ms |
コンパイル使用メモリ | 28,240 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-09-13 07:33:58 |
合計ジャッジ時間 | 1,762 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 0 ms
4,380 KB |
testcase_05 | AC | 1 ms
4,380 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 0 ms
4,380 KB |
testcase_10 | AC | 0 ms
4,380 KB |
testcase_11 | AC | 1 ms
4,376 KB |
testcase_12 | AC | 1 ms
4,380 KB |
testcase_13 | AC | 1 ms
4,380 KB |
testcase_14 | AC | 0 ms
4,376 KB |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | AC | 1 ms
4,376 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | AC | 1 ms
4,380 KB |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | AC | 0 ms
4,376 KB |
testcase_33 | AC | 1 ms
4,380 KB |
testcase_34 | AC | 0 ms
4,380 KB |
コンパイルメッセージ
main.c: 関数 ‘main’ 内: main.c:7:9: 警告: implicit declaration of function ‘gets’; did you mean ‘fgets’? [-Wimplicit-function-declaration] 7 | gets(s); | ^~~~ | fgets /tmp/cc7aVrFu.o: In function `main': main.c:(.text.startup+0xd): warning: the `gets' function is dangerous and should not be used.
ソースコード
#include <stdio.h> int main(void) { char s[14],t; int i,j; gets(s); for(i=0;i<12;i++){ for(j=12;j>i;j--){ if(s[j-1]>s[j]){ t=s[j-1]; s[j-1]=s[j]; s[j]=t; } } } for(i=1;i<12;i++){ if(s[i-1]!=s[i]&&s[i]!=s[i+1]){ printf("%c",s[i]); break; } } if(i==12)puts("Impossible"); return 0; }