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