結果
問題 | No.1113 二つの整数 / Two Integers |
ユーザー |
![]() |
提出日時 | 2023-04-08 09:23:08 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 297 bytes |
コンパイル時間 | 296 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-10-03 05:30:18 |
合計ジャッジ時間 | 3,011 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 10 WA * 5 |
コンパイルメッセージ
Syntax OK
ソースコード
a,b=gets.split(" ").map{|e| e.to_i}d=2d2=d**2d3=d**3ans=1while d3<=a and d3<=bif a%d2==0 && b%d2==0 thenc=3a/=d2b/=d2while a%d==0 && b%d==0a/=db/=dc+=1endans+=cendd+=1d2=d**2d3=d**3endif a.gcd(b)>1 || ans%2==0 thenputs "Even"elseputs "Odd"end