結果
| 問題 | No.446 ゆきこーだーの雨と雪 (1) |
| コンテスト | |
| ユーザー |
dohatsutsu
|
| 提出日時 | 2016-11-18 22:29:05 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 305µs | |
| コード長 | 404 bytes |
| 記録 | |
| コンパイル時間 | 875 ms |
| コンパイル使用メモリ | 177,540 KB |
| 実行使用メモリ | 9,904 KB |
| 最終ジャッジ日時 | 2026-10-11 21:14:55 |
| 合計ジャッジ時間 | 2,053 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 14 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
bool check(string s){
if(s=="0")return true;
if(s[0]=='0')return false;
for(char ch:s){
if('0'<=ch&&ch<='9'){
}else{
return false;
}
}
int num;
stringstream ss;
ss<<s;
ss>>num;
return (0<=num && num<= 12345);
}
int main(){
string A,B;
cin>>A>>B;
if(check(A)&&check(B))cout<<"OK"<<endl;
else cout<<"NG"<<endl;
}
dohatsutsu