結果
問題 |
No.847 Divisors of Power
|
ユーザー |
![]() |
提出日時 | 2019-07-29 22:34:05 |
言語 | Java (openjdk 23) |
結果 |
TLE
|
実行時間 | - |
コード長 | 486 bytes |
コンパイル時間 | 2,009 ms |
コンパイル使用メモリ | 74,456 KB |
実行使用メモリ | 61,176 KB |
最終ジャッジ日時 | 2024-10-07 02:56:54 |
合計ジャッジ時間 | 5,845 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | AC * 2 TLE * 1 -- * 23 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); long n = Integer.parseInt(sc.next()); long k = Integer.parseInt(sc.next()); long m = Integer.parseInt(sc.next()); long p = (long)Math.pow(n,k); long ans = 0; for(long i = 1; i < m+1; i++){ if(p%i == 0){ ans++; } } System.out.print(ans); } }