結果
問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
ユーザー |
![]() |
提出日時 | 2016-11-18 22:31:50 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 571 bytes |
コンパイル時間 | 1,923 ms |
コンパイル使用メモリ | 56,320 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-26 07:13:30 |
合計ジャッジ時間 | 1,048 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 11 WA * 2 |
ソースコード
#include<iostream> using namespace std; bool Alp(string s){ bool ret=false; for(int i=0; i<s.size(); i++){ ret|=(('a'<=s[i]&&s[i]<='z')||('A'<=s[i]&&s[i]<='Z')); } return ret; } bool Zero(string s){ return (s[0]=='0')&(s.size()>1); } int main(){ string A, B; cin>> A>> B; if(Alp(A)||Alp(B)){ cout<< "NG"<< endl; return 0; } if(Zero(A)||Zero(B)){ cout<< "NG"<< endl; return 0; } if(stoi(A)<=12345&&stoi(B)<=12345){ cout<< "OK"<< endl; }else{ cout<< "NO"<< endl; } return 0; }