結果
| 問題 | No.312 置換処理 |
| コンテスト | |
| ユーザー |
Ysmr_Ry
|
| 提出日時 | 2016-03-03 18:03:47 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 308 bytes |
| 記録 | |
| コンパイル時間 | 209 ms |
| コンパイル使用メモリ | 22,784 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-24 13:49:47 |
| 合計ジャッジ時間 | 1,379 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 39 WA * 6 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:16:29: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘ll’ {aka ‘long long int’} [-Wformat=]
16 | { printf( "%d\n", i ); return 0; }
| ~^ ~
| | |
| int ll {aka long long int}
| %lld
main.cpp:11:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf( "%lld", &N );
| ~~~~~^~~~~~~~~~~~~~
ソースコード
// yukicoder 312 (http://yukicoder.me/problems/847)
#include<cstdio>
#define rep(i,a) for(int i=0;i<(a);++i)
typedef long long ll;
ll N;
int main()
{
scanf( "%lld", &N );
for( ll i = 3; i*i <= N; ++i )
{
if( N % i == 0 )
{ printf( "%d\n", i ); return 0; }
}
printf( "%lld\n", N );
return 0;
}
Ysmr_Ry