結果
| 問題 | No.446 ゆきこーだーの雨と雪 (1) |
| コンテスト | |
| ユーザー |
RCCW
|
| 提出日時 | 2017-02-10 00:21:31 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 666 bytes |
| 記録 | |
| コンパイル時間 | 1,088 ms |
| コンパイル使用メモリ | 175,752 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-31 20:38:55 |
| 合計ジャッジ時間 | 2,050 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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