結果
問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
ユーザー |
![]() |
提出日時 | 2016-11-18 22:25:05 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 412 bytes |
コンパイル時間 | 1,389 ms |
コンパイル使用メモリ | 166,604 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-26 06:36:46 |
合計ジャッジ時間 | 1,974 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 11 WA * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; bool ok(string s) { if(s == "0") return true; if(s[0] == '0') return false; for(int i = 0; i < s.size(); i++) { if(!isdigit(s[i])) return false; } return true; } int main() { cin.tie(0); ios::sync_with_stdio(false); string A, B; cin >> A >> B; if(ok(A) && ok(B)) { cout << "OK" << endl; } else { cout << "NG" << endl; } }