結果
問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
ユーザー |
|
提出日時 | 2020-06-15 00:18:54 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 455 bytes |
コンパイル時間 | 2,352 ms |
コンパイル使用メモリ | 191,892 KB |
最終ジャッジ日時 | 2025-01-11 04:21:48 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 11 WA * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) bool check(const string &s) { for (char c: s) if (!isdigit(c)) return false; if (s.length() > 1 && s[0] == '0') return false; return true; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); string a, b; cin >> a >> b; if (check(a) && check(b)) cout << "OK" << endl; else cout << "NG" << endl; return 0; }