結果
| 問題 | No.587 七対子 |
| コンテスト | |
| ユーザー |
zaichu
|
| 提出日時 | 2017-11-03 22:42:19 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 747 bytes |
| 記録 | |
| コンパイル時間 | 1,464 ms |
| コンパイル使用メモリ | 173,520 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-22 16:06:24 |
| 合計ジャッジ時間 | 2,356 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 WA * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y)
{
if (y == 0)
return x;
return gcd(y, x % y);
}
long long lcm(long long x, long long y)
{
if (x == 0 || y == 0)
return 0;
return x / gcd(x, y) * y;
}
int main()
{
string s;
cin >> s;
map<char, int> mp;
for (int i = 0; i < 13; i++)
{
mp[s[i]]++;
}
string ans = "Impossible";
for (int i = 0; i < 13; i++)
{
if (mp[s[i]] == 1)
{
if (ans != "Impossible")
{
ans = "Impossible";
break;
}
else
{
ans = s[i];
}
}
}
cout << ans << endl;
}
zaichu