結果
問題 |
No.358 も~っと!門松列
|
ユーザー |
![]() |
提出日時 | 2016-09-25 14:57:00 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 425 bytes |
コンパイル時間 | 474 ms |
コンパイル使用メモリ | 60,244 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-18 11:55:57 |
合計ジャッジ時間 | 1,262 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 WA * 13 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int A1,a1,A2,a2,A3,a3; cin>>A1>>A2>>A3; int c=0; for(int p=1;p<=1000;p++){ a1=A1%p; a2=A2%p; a3=A3%p; if(a1>a2&&a2<a3||a1<a2&&a2>a3){ c++; if(p==1000){ cout<<"INF"<<endl; return 0; } } } cout<<c<<endl; return 0; }