結果
問題 | No.300 平方数 |
ユーザー |
![]() |
提出日時 | 2016-02-19 00:33:25 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 22 ms / 1,000 ms |
コード長 | 336 bytes |
コンパイル時間 | 721 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-22 12:09:44 |
合計ジャッジ時間 | 1,652 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
コンパイルメッセージ
main.c: In function ‘run’: main.c:8:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%lld",&x); | ^~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> typedef long long int ln; void run(void){ ln x,y; scanf("%lld",&x); y=1; ln k=2; while(k*k<=x){ if(x%(k*k)==0){ x/=k*k; } else if (x%k==0){ x/=k; y*=k; } else { k++; } } if(x>1) y*=x; printf("%lld\n",y); return; } int main(void){ run(); return 0; }