結果
問題 | No.446 ゆきこーだーの雨と雪 (1) |
ユーザー |
|
提出日時 | 2020-04-17 20:26:12 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 531 bytes |
コンパイル時間 | 2,369 ms |
コンパイル使用メモリ | 192,740 KB |
最終ジャッジ日時 | 2025-01-09 19:35:48 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 12 WA * 1 |
ソースコード
#include <bits/stdc++.h> using namespace std; int parse(string x){ if(x.substr(0, 2) == "00") return -1; int res = 0; for(int i = 0; i < x.size(); ++i){ if('0' > x[i] or '9' < x[i]) return -1; res *= 10; res += x[i]-'0'; } if(res > 12345) return -1; return res; } int main(){ string a, b; cin >> a >> b; int A = parse(a), B = parse(b); if(A < 0 or B < 0) cout << "NG" << '\n'; else cout << "OK" << '\n'; return 0; }