結果
問題 | No.903 太郎の確率 |
ユーザー |
![]() |
提出日時 | 2019-10-19 20:44:27 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 237 bytes |
コンパイル時間 | 2,084 ms |
コンパイル使用メモリ | 158,076 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 20:09:40 |
合計ジャッジ時間 | 1,778 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
コンパイルメッセージ
main.cpp:9:2: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] 9 | main() { | ^~~~
ソースコード
#include<bits/stdc++.h> using namespace std; int gcd(int a, int b) { return b != 0 ? gcd(b, a % b) : a; } int lcm(int a, int b) { return a * b / gcd(a, b); } main() { double n; cin >>n; double ans =1/n; cout << ans <<endl; }