結果
問題 |
No.744 循環小数N桁目 Easy
|
ユーザー |
![]() |
提出日時 | 2019-08-03 15:58:41 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 427 ms / 2,000 ms |
コード長 | 295 bytes |
コンパイル時間 | 482 ms |
コンパイル使用メモリ | 53,720 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 20:31:13 |
合計ジャッジ時間 | 1,750 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
#include <iostream> int solve(int a, int b, int cur, int i); using namespace std; int main() { int n; cin >> n; cout << solve(2, 7, 0, n) << '\n'; } int solve(int a, int b, int cur, int i) { if (cur == i) return a / b; return solve(a % b * 10, b, cur + 1, i); }