結果
問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
ユーザー |
|
提出日時 | 2019-07-30 21:38:19 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 410 bytes |
コンパイル時間 | 2,581 ms |
コンパイル使用メモリ | 194,996 KB |
最終ジャッジ日時 | 2025-01-07 10:09:55 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
ソースコード
#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)||stoi(a)>12345||stoi(b)>12345) puts("NG"); else puts("OK"); return 0; }