結果
問題 |
No.1902 AC Ratio
|
ユーザー |
![]() |
提出日時 | 2022-04-11 19:51:05 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 527 bytes |
コンパイル時間 | 509 ms |
コンパイル使用メモリ | 41,412 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-15 18:23:32 |
合計ジャッジ時間 | 1,195 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
/* -*- coding: utf-8 -*- * * 1902.cc: No.1902 AC Ratio - yukicoder */ #include<cstdio> #include<algorithm> using namespace std; /* constant */ /* typedef */ /* global variables */ char s[32]; /* subroutines */ int readint(char *(&cpt)) { int x = 0; while (*cpt >= '0' && *cpt <= '9') x = x * 10 + (*(cpt++) - '0'); return x; } /* main */ int main() { scanf("%s", s); char *cpt = s; int a = readint(cpt); cpt++; // '/' int b = readint(cpt); printf("%.5lf\n", (double)a / b); return 0; }