結果
| 問題 | No.587 七対子 |
| コンテスト | |
| ユーザー |
funakoshi
|
| 提出日時 | 2019-08-27 17:38:57 |
| 言語 | C (gcc 15.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 698 bytes |
| 記録 | |
| コンパイル時間 | 465 ms |
| コンパイル使用メモリ | 29,440 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-16 05:45:06 |
| 合計ジャッジ時間 | 1,412 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 WA * 21 |
ソースコード
#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++;
str[j]='@';
if(cnt>2)
{
printf("Impossible");
goto loopend;
}
}
}
if(cnt==1)
{
add=cmp;
break;
}
}
printf("%c",add);
loopend:
return 0;
}
funakoshi