結果
| 問題 | No.587 七対子 | 
| コンテスト | |
| ユーザー |  funakoshi | 
| 提出日時 | 2019-08-27 17:37:01 | 
| 言語 | C (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 670 bytes | 
| コンパイル時間 | 1,261 ms | 
| コンパイル使用メモリ | 29,568 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-16 05:35:07 | 
| 合計ジャッジ時間 | 2,411 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 12 WA * 23 | 
ソースコード
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
int main(void)
{
    char str[14]="";
    char cmp,add;
    scanf("%s",str);
    for(int i=0;i<strlen(str)-1;i++)
    {
        int cnt=1;
        cmp=str[i];
        for(int j=i+1;j<strlen(str);j++)
        {
            if(cmp==str[j])
            {
                cnt++;
                if(cnt>2)
                {
                    printf("Impossible");
                    goto loopend;
                }
            }
        }
        if(cnt==1)
        {
            add=cmp;
            break;
        }
    }
    printf("%c",add);
    loopend:
    return 0;
}
            
            
            
        