結果
| 問題 |
No.313 π
|
| コンテスト | |
| ユーザー |
Mori
|
| 提出日時 | 2019-11-27 23:41:04 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,094 bytes |
| コンパイル時間 | 1,538 ms |
| コンパイル使用メモリ | 159,076 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-15 19:03:11 |
| 合計ジャッジ時間 | 2,408 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 32 |
ソースコード
#include <bits/stdc++.h>
#include <set>
#include <cstdio>
#include <vector>
#include <iostream>
#include <utility>
#define fir first
#define sec second
#define get(n) scanf("%d",&n);
#define gets(s) string s;cin >> (s);
#define All(s) (c).begin(), (c).end()
#define chmin(x, y) x = min(x, y);
#define chmax(x, y) x = max(x, y);
#define rep(i, j) for (int (i)=0;(i)<(j);(i)++)
#define repk(i, j, k) for(int (i)=(j);(i)<(k);(i)++)
#define dump(x) cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
using namespace std;
typedef long long int ll;
const ll INF = 10241024;
const int MK = 2 * (1e6);
const double PI = acos(-1);
int P,Q,A;
double pai;
void input(){
cin >> pai;
}
void solve(){
double P = PI;
for (int i=1;i<=MK;i++){
pai *= 10.0;
P *= 10.0;
int pai2 = floor(pai);
int P2 = floor(P);
if(pai2 - P2 == 0)continue;
cout << pai2 % 10 << "\n" << P2 % 10 << endl;
return;
}
}
int main () {
solve();
return 0;
}
Mori