結果
問題 | No.446 ゆきこーだーの雨と雪 (1) |
ユーザー |
|
提出日時 | 2021-02-23 21:30:05 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 654 bytes |
コンパイル時間 | 894 ms |
コンパイル使用メモリ | 110,996 KB |
最終ジャッジ日時 | 2025-01-19 04:15:34 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
ソースコード
#include <algorithm>#include <array>#include <cmath>#include <cstdio>#include <deque>#include <iomanip>#include <iostream>#include <numeric>#include <optional>#include <queue>#include <sstream>#include <unordered_map>#include <unordered_set>#include <vector>using namespace std;int main() {string a, b;cin >> a >> b;auto f = [](string &s) {for (auto c : s) {if (!('0' <= c && c <= '9'))return false;}if (s[0] == '0' && s.size() > 1)return false;return stoi(s) <= 12345;};cout << (f(a) && f(b) ? "OK" : "NG") << endl;return 0;}