結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー aaaaaaiu
提出日時 2019-07-30 21:34:47
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 380 bytes
コンパイル時間 1,960 ms
コンパイル使用メモリ 194,032 KB
最終ジャッジ日時 2025-01-07 10:09:38
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 11 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

bool lzero(string s) {
    return s.size() > 1 && s[0] == '0';
}

bool isnum(string s) {
    for (char c : s) if (c < '0' || '9' < c) return false;
    return true;
}

int main() {
    string a, b;
    cin>>a>>b;
    if (lzero(a)||lzero(b)||!isnum(a)||!isnum(b)) puts("NG");
    else puts("OK");
    return 0;
}
0