結果
問題 | No.926 休日の平均 |
ユーザー |
👑 |
提出日時 | 2019-11-15 02:50:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 307 bytes |
コンパイル時間 | 665 ms |
コンパイル使用メモリ | 69,536 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-24 22:58:49 |
合計ジャッジ時間 | 1,577 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <iostream>#include <iomanip>using namespace std;template <typename T>T gcd(T a,T b){if(a%b==0)return b;else return gcd(b,a%b);}int main(){cout << fixed << setprecision(20);int a,b,c;cin>>a>>b>>c;int d = a*b/gcd(a,b);int hol = d/b*c;cout << (double)hol/(d/a) << endl;}