結果
| 問題 | No.1624 三角形の反射 | 
| コンテスト | |
| ユーザー |  milanis48663220 | 
| 提出日時 | 2021-07-23 21:53:53 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 1,225 bytes | 
| コンパイル時間 | 990 ms | 
| コンパイル使用メモリ | 113,768 KB | 
| 最終ジャッジ日時 | 2025-01-23 07:59:00 | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 19 WA * 3 | 
ソースコード
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <tuple>
#include <cmath>
#include <numeric>
#include <functional>
#include <cassert>
#define debug_value(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << #x << "=" << x << endl;
#define debug(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << x << endl;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using namespace std;
typedef long long ll;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << setprecision(10) << fixed;
    double A; cin >> A;
    int b = A*1000+0.01;
    int a = 1000;
    int g = gcd(a, b);
    a /= g;
    b /= g;
    // cout << a << ' ' << b << endl;
    char ans;
    if(b%2 == 0){
        if(a%2 == 0) ans = 'A';
        else ans = 'B';
    }else{
        if(a%2 == 0) ans = 'C';
        else ans = 'A';
    }
    int cnt = 0;
    if(a == b){
        cnt = 1;
    }else{
        if(a < b) swap(a, b);
        cnt =  a*2-2+b-1;
    }
    cout << (char)ans << ' ' << cnt << endl;
}
            
            
            
        