結果
| 問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
| ユーザー |
RCCW
|
| 提出日時 | 2017-02-10 00:21:31 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 666 bytes |
| コンパイル時間 | 1,347 ms |
| コンパイル使用メモリ | 159,324 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 02:36:39 |
| 合計ジャッジ時間 | 2,046 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 12 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void) {
string a, b;
cin>>a>>b;
if(a[0]=='0'||b[0]=='0'){cout<<"NG"<<endl;return 0;}
string str(a);
int num = std::atoi(str.c_str());
if(num>12345){
cout<<"NG"<<endl;
return 0;
}
string strb(b);
int numb = std::atoi(strb.c_str());
if(numb>12345){
cout<<"NG"<<endl;
return 0;
}
for (int i = 0; i < a.length(); ++i) {
if(a[i]>=48&&a[i]<=57){
}else{
cout<<"NG"<<endl;
return 0;
}
}
for (int i = 0; i < b.length(); ++i) {
if(b[i]>=48&&b[i]<=57){
}else{
cout<<"NG"<<endl;
return 0;
}
}
cout<<"OK"<<endl;
}
RCCW