結果
| 問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
| ユーザー |
hotpepsi
|
| 提出日時 | 2016-11-20 21:30:37 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 502 bytes |
| コンパイル時間 | 481 ms |
| コンパイル使用メモリ | 58,704 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 09:07:56 |
| 合計ジャッジ時間 | 1,049 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
ソースコード
#include <iostream>
#include <sstream>
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
typedef long long LL;
int main(int argc, char *argv[]) {
string a, b;
cin >> a >> b;
int ai = atoi(a.c_str()), bi = atoi(b.c_str());
char wa[16], wb[16];
sprintf(wa, "%d", ai);
sprintf(wb, "%d", bi);
bool ans = strcmp(a.c_str(), wa) == 0 && strcmp(b.c_str(), wb) == 0 &&
ai >= 0 && ai <= 12345 && bi >= 0 && bi <= 12345;
cout << (ans ? "OK" : "NG") << endl;
return 0;
}
hotpepsi