fork download
  1. package main
  2. import "fmt"
  3.  
  4. func main(){
  5. x := 13370
  6. for x > 1 {
  7. if x % 2 != 0{
  8. x = x * 3 + 1
  9. } else {
  10. x /= 2
  11. }
  12. fmt.Println(x)
  13. }
  14. }
Success #stdin #stdout 0s 790016KB
stdin
Standard input is empty
stdout
6685
20056
10028
5014
2507
7522
3761
11284
5642
2821
8464
4232
2116
1058
529
1588
794
397
1192
596
298
149
448
224
112
56
28
14
7
22
11
34
17
52
26
13
40
20
10
5
16
8
4
2
1