結果
問題 | No.499 7進数変換 |
ユーザー |
![]() |
提出日時 | 2017-04-08 23:05:19 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 248 bytes |
コンパイル時間 | 122 ms |
コンパイル使用メモリ | 22,400 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-17 23:57:20 |
合計ジャッジ時間 | 1,125 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%llu",&n); | ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>#include <math.h>#include <stdlib.h>int main(void){unsigned long long n;scanf("%llu",&n);unsigned long long m=0,keta=1;while(n>=7){m+=(n%7)*keta;keta*=10;n=n/7;}m+=n*keta;printf("%llu\n",m);return 0;}