結果
問題 |
No.887 Collatz
|
ユーザー |
|
提出日時 | 2019-09-21 10:33:58 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 310 bytes |
コンパイル時間 | 402 ms |
コンパイル使用メモリ | 29,056 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-17 11:10:26 |
合計ジャッジ時間 | 1,524 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 WA * 1 |
ソースコード
#include <stdio.h> int main(void) { int n; int max=0; int count=0; scanf("%d",&n); while(n>1){ if(max<n) max=n; if(n%2==0){ n/=2; }else{ n=3*n+1; } count++; } printf("%d\n%d\n",count,max); }