結果
| 問題 | No.358 も~っと!門松列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-19 16:59:04 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 473 bytes |
| 記録 | |
| コンパイル時間 | 1,039 ms |
| コンパイル使用メモリ | 184,500 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-21 06:15:23 |
| 合計ジャッジ時間 | 2,107 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
bool ok( int a, int b, int c ){
if( a == b or b == c or a == c )
return false;
if( max( { a, b, c } ) == b or min( { a, b, c } ) == b )
return true;
return false;
}
signed main(){
int a, b, c; cin >> a >> b >> c;
if( ok( a, b, c ) )
cout << "INF" << endl;
else{
int ans = 0;
for( int i = 1; i <= 1000; ++i )
ans += ok( a % i, b % i, c % i );
cout << ans << endl;
}
return 0;
}