結果
| 問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
| ユーザー |
kyo1
|
| 提出日時 | 2020-09-15 09:32:11 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 484 bytes |
| コンパイル時間 | 1,622 ms |
| コンパイル使用メモリ | 195,732 KB |
| 最終ジャッジ日時 | 2025-01-14 14:58:03 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
string A, B;
cin >> A >> B;
function check = [](string s) {
for (int i = 0; i < (int)s.size(); i++) {
if (!('0' <= s[i] && s[i] <= '9')) return false;
}
int x = stoi(s);
return x <= 12345 && !((int)s.size() > 1 && s[0] == '0');
};
if (check(A) && check(B)) {
cout << "OK" << '\n';
} else {
cout << "NG" << '\n';
}
return 0;
}
kyo1