結果
| 問題 |
No.2607 Add One Digit
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-31 21:39:51 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 327 bytes |
| コンパイル時間 | 6,285 ms |
| コンパイル使用メモリ | 242,404 KB |
| 最終ジャッジ日時 | 2025-02-21 17:37:35 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:12:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char*')
12 | cin >> (s+1);
| ~~~ ^~ ~~~~~
| | |
| | char*
| std::istream {aka std::basic_istream<char>}
In file included from /home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.4.0/include/c++/12/sstream:38,
from /home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.4.0/include/c++/12/complex:45,
from /home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.4.0/include/c++/12/ccomplex:39,
from /home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.4.0/include/c++/12/x86_64-pc-linux-gnu/bits/stdc++.h:54,
from main.cpp:1:
/home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.4.0/include/c++/12/istream:168:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
168 | operator>>(bool& __n)
| ^~~~~~~~
/home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.4.0/include/c++/12/istream:168:7: note: conversion of argument 1 would be ill-formed:
main.cpp:12:18: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'char*'
12 | cin >> (s+1);
| ~~^~~
/home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.4.0/include/c++/12/istream:172:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
172 | operator>>(short& __n);
| ^~~~~~~~
/home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.4.0/include/c++/12/istream:172:7: note: conversion of argument 1 would be ill-formed:
main.cpp:12:18: error: invalid conversion from 'char*' to 'short int' [-fpermissive
ソースコード
#include<bits/stdc++.h>
#define pt printf(">>>")
#define mid (((l)+(r))/2)
using namespace std;
typedef long long ll;
typedef long double ld;
const ll N=1e6+10,inf=1e18+10,mod=1e9+7;
const ll dir[4][2]={{1,0},{-1,0},{0,1},{0,-1}};
ll n;
char s[20];
int main(){
cin >> (s+1);
n=strlen(s+1);
cout << 10*(n+1)-n-1;
return 0;
}