結果
問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
ユーザー |
![]() |
提出日時 | 2018-12-29 02:47:22 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 522 bytes |
コンパイル時間 | 404 ms |
コンパイル使用メモリ | 58,072 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-01 15:07:03 |
合計ジャッジ時間 | 974 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
ソースコード
#include <iostream> #include <algorithm> #include <cstdio> #include <string> #define ll long long using namespace std; int main(){ string a,b; cin>>a>>b; int err=0; for(int i=0;i<a.length();++i){ if(!i&&a[i]=='0'&&a.length()>1) err=1; if(a[i]>58) err=1; } for(int i=0;i<b.length();++i){ if(!i&&b[i]=='0'&&b.length()>1) err=1; if(b[i]>58) err=1; } if(atoi(a.c_str())>12345||atoi(b.c_str())>12345) err=1; if(err) cout<<"NG"<<endl; else cout<<"OK"<<endl; return 0; }