結果
| 問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
| コンテスト | |
| ユーザー |
HIBIKU
|
| 提出日時 | 2016-12-31 17:45:45 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 413 bytes |
| コンパイル時間 | 453 ms |
| コンパイル使用メモリ | 57,088 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-16 04:35:02 |
| 合計ジャッジ時間 | 1,055 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 10 WA * 3 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
bool solve(string n) {
if (n == "0") return true;
if (n[0]=='0') return false;
for (auto a : n) {
if (a <= '9'&&'0' <= a) {
}
else return false;
}
if ("0" <= n&&n <= "12345") return true;
else return false;
}
int main() {
string a,b;
cin >> a >> b;
if (solve(a) && solve(b)) cout << "OK" << endl;
else cout << "NG" << endl;
return 0;
}
HIBIKU