結果
問題 |
No.415 ぴょん
|
ユーザー |
![]() |
提出日時 | 2016-09-09 04:34:46 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 829 ms |
コンパイル使用メモリ | 64,684 KB |
実行使用メモリ | 13,632 KB |
最終ジャッジ日時 | 2024-11-15 22:56:45 |
合計ジャッジ時間 | 4,897 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 WA * 2 TLE * 1 |
ソースコード
#include<iostream> #include <math.h> #include <string> #include <iomanip> using namespace std; int main(){ int n,d; int a=1; int cnt = 0; cin >> n >> d; while (-1){ a = a + d; if (a > n){ a = a - n; } if (a == 1){ break; } cnt++; } cout << cnt << endl; return 0; }